{"id":25821405,"url":"https://github.com/wnikk/laravel-access-rules","last_synced_at":"2025-12-03T04:06:26.808Z","repository":{"id":65768170,"uuid":"599260013","full_name":"wnikk/laravel-access-rules","owner":"wnikk","description":"Simple system of ACR (Access Control Rules) for Laravel, with roles, groups, unlimited inheritance and possibility of multiplayer use.","archived":false,"fork":false,"pushed_at":"2024-10-15T16:09:56.000Z","size":111,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-21T15:04:46.565Z","etag":null,"topics":["acl","acr","authorization","laravel","multiuser","permissions","php","rbac","roles","secure"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wnikk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-08T19:25:48.000Z","updated_at":"2025-02-18T11:36:01.000Z","dependencies_parsed_at":"2024-04-29T10:31:21.937Z","dependency_job_id":"51a8822c-8abb-43aa-9446-73ca49698ed5","html_url":"https://github.com/wnikk/laravel-access-rules","commit_stats":{"total_commits":46,"total_committers":3,"mean_commits":"15.333333333333334","dds":"0.13043478260869568","last_synced_commit":"2b6102e61c40cfc4171aa82d48660d311c693986"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wnikk%2Flaravel-access-rules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wnikk%2Flaravel-access-rules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wnikk%2Flaravel-access-rules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wnikk%2Flaravel-access-rules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wnikk","download_url":"https://codeload.github.com/wnikk/laravel-access-rules/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241139904,"owners_count":19916465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acl","acr","authorization","laravel","multiuser","permissions","php","rbac","roles","secure"],"created_at":"2025-02-28T10:55:08.410Z","updated_at":"2025-12-03T04:06:26.803Z","avatar_url":"https://github.com/wnikk.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Laravel Access Control Rules](https://raw.githubusercontent.com/wnikk/laravel-access-rules/main/docs/art/laravel-access-control-rules-logo.png)\n\n# Access Control Rules (Laravel Permissions Package)\n\n[![License](https://poser.pugx.org/wnikk/laravel-access-rules/license)](//packagist.org/packages/wnikk/laravel-access-rules)\n[![Code Climate](https://codeclimate.com/github/wnikk/laravel-access-rules/badges/gpa.svg)](//codeclimate.com/github/wnikk/laravel-access-rules)\n[![PHP Version Require](http://poser.pugx.org/wnikk/laravel-access-rules/require/php)](//packagist.org/packages/wnikk/laravel-access-rules)\n[![Total Downloads](http://poser.pugx.org/wnikk/laravel-access-rules/downloads)](//packagist.org/packages/wnikk/laravel-access-rules)\n[![Latest Stable Version](https://poser.pugx.org/wnikk/laravel-access-rules/v)](//packagist.org/packages/wnikk/laravel-access-rules)\n[![Latest Unstable Version](http://poser.pugx.org/wnikk/laravel-access-rules/v/unstable)](//packagist.org/packages/wnikk/laravel-access-rules)\n\n## What does Access Control Rules support?\n\n- Multiple user models.\n- Multiple permissions can be attached to users.\n- Multiple permissions can be attached to groups.\n- Permissions verification.\n- Permissions caching.\n- Events when permissions are attached, detached or synced.\n- Multiple permissions can be attached to user or group.\n- Permissions can be inherited with unlimited investment from users and groups.\n- Laravel gates and policies.\n\n## Visual Interface\nThe visual interface for managing access control rules and permissions can be found at [this link](https://github.com/wnikk/laravel-access-ui).\nIt offers an intuitive and user-friendly environment for administrators to define roles, assign permissions, and configure access rules.\n\nFor detailed usage examples and instructions, refer to the [example repository](https://github.com/wnikk/-laravel-access-example).\n\n## Documentation, Installation, and Usage Instructions\n\nSee the [documentation](https://github.com/wnikk/laravel-access-rules/tree/master/docs) for detailed installation and usage instructions.\n\n## Versions \u0026 Dependencies\n\n| Laravel Access Control Rules | PHP       | Laravel |\n|------------------------------|-----------|---------|\n| 2.x+                         | 7.4 - 8.4 | 8 - 12  |\n| 1.x                          | 7.1 - 7.3 | 5.5 - 8 |\n\n## You can install the package using composer:\n\n```bash\ncomposer require wnikk/laravel-access-rules\n```\n\nSee the [installation page](https://github.com/wnikk/laravel-access-rules/blob/main/docs/installation.md) for detailed.\n\n\n## What It Does\nThis package allows you to manage user permissions and groups (instead roles) in a database.\n\nOnce installed you can do stuff like this:\n\n```php\nuse Wnikk\\LaravelAccessRules\\AccessRules;\n\n// Add new rule permission\nAccessRules::newRule('articles.edit', 'Access to editing articles');\n```\n```php\n// Adding permissions to a user\n$user-\u003eaddPermission('articles.edit');\n```\n\n\nOr you can inherit the rights from another user or groups\n\n```php\n// According to the existing user from object\n$user-\u003einheritPermissionFrom(User::find(1));\n\n// By identifier\n$user-\u003einheritPermissionFrom(User::class, 1);\n\n// From the group\n$user-\u003einheritPermissionFrom('Group', 1);\n```\n\n\nBecause all permissions will be registered on **Laravel's gate**, you can check if a user has a permission with Laravel's default `can` function:\n\n```php\n$user-\u003ecan('articles.edit'); \n```\n\nOr without model:\n\n```php\n$acr = new AccessRules;\n$acr-\u003esetOwner('AnotherAnySystemUser', 'UserID-From-Any-System-FF01');\n$check = $acr-\u003ecan('articles.edit');\nif (!$check) {abort(403);}\n```\n\nExamples of how can be used in more detail described in [Basic Usage](https://github.com/wnikk/laravel-access-rules/blob/main/docs/basic-usage.md) section.\n\n## Opening an Issue\n\nBefore opening an issue there are a couple of considerations:\n* You are all awesome!\n* Pull requests are more than welcome.\n* **Read the instructions** and make sure all steps were *followed correctly*.\n* **Check** that the issue is not *specific to your development environment* setup.\n* **Provide** *duplication steps*.\n* **Attempt to look into the issue**, and if you *have a solution, make a pull request*.\n* **Show that you have made an attempt** to *look into the issue*.\n* **Check** to see if the issue you are *reporting is a duplicate* of a previous reported issue.\n* **Following these instructions show me that you have tried.**\n* Please be considerate that this is an open source project that I provide to the community for FREE when opening an issue.\n\n## Alternatives\n\n- [spatie/laravel-permission](https://github.com/spatie/laravel-permission) takes a slightly different approach to its features.\n- [ultraware/roles](https://github.com/ultraware/roles) It not supported and transferred to archive.\n- [santigarcor/laratrust](https://github.com/santigarcor/laratrust) implements team support.\n- [zizaco/entrust](https://github.com/zizaco/entrust) offers some wildcard pattern matching.\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnikk%2Flaravel-access-rules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwnikk%2Flaravel-access-rules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwnikk%2Flaravel-access-rules/lists"}