{"id":15412196,"url":"https://github.com/maymeow/cakephp-identity","last_synced_at":"2025-08-09T03:15:35.029Z","repository":{"id":62525796,"uuid":"268734510","full_name":"MayMeow/cakephp-identity","owner":"MayMeow","description":"🗝 CakePHP plugin to manage roles and permissions.","archived":false,"fork":false,"pushed_at":"2020-06-02T16:12:53.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-28T01:42:06.293Z","etag":null,"topics":["authorization","cakephp","cakephp-plugin","security"],"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/MayMeow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-02T07:44:10.000Z","updated_at":"2020-06-02T16:12:56.000Z","dependencies_parsed_at":"2022-11-02T14:15:53.681Z","dependency_job_id":null,"html_url":"https://github.com/MayMeow/cakephp-identity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fcakephp-identity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fcakephp-identity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fcakephp-identity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MayMeow%2Fcakephp-identity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MayMeow","download_url":"https://codeload.github.com/MayMeow/cakephp-identity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550114,"owners_count":19657538,"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":["authorization","cakephp","cakephp-plugin","security"],"created_at":"2024-10-01T16:51:40.070Z","updated_at":"2025-02-18T20:46:48.437Z","avatar_url":"https://github.com/MayMeow.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CakephpIdentity plugin for CakePHP\n\nManage roles and permissions for CakePHP.\n\n## Requirements\n\n* CakePHP 4.*\n* PHP \u003e= 7.3\n* Database (Mysql/MariaDB/Postgres)\n* Existing Users table where are stored users data used for authentication.\n\nIf you do not have users table you can create new migration and update `change()` function to look like this\n\n```php\n/**\n     * Change Method.\n     *\n     * More information on this method is available here:\n     * https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method\n     * @return void\n     */\n    public function change()\n    {\n        $table = $this-\u003etable('users');\n        $table-\u003eaddColumn('email', 'string', [\n            'default' =\u003e null,\n            'limit' =\u003e 255,\n            'null' =\u003e false,\n        ]);\n        $table-\u003eaddColumn('password', 'string', [\n            'default' =\u003e null,\n            'limit' =\u003e 255,\n            'null' =\u003e false,\n        ]);\n        $table-\u003eaddColumn('created', 'datetime', [\n            'default' =\u003e null,\n            'null' =\u003e false,\n        ]);\n        $table-\u003eaddColumn('modified', 'datetime', [\n            'default' =\u003e null,\n            'null' =\u003e false,\n        ]);\n        $table-\u003ecreate();\n    }\n```\n\nor use `cake`\n\n```bash\nphp bin/cake.php bake migration CreateUsers email:string password:string created modified\n```\n\n## Installation\n\nYou can install this plugin into your CakePHP application using [composer](https://getcomposer.org).\n\nThe recommended way to install composer packages is:\n\n```bash\ncomposer require maymeow/cakephp-identity\n```\n\nAnd run\n\n```\nphp bin/cake.php migrations migrate -p CakephpIdentity\n```\n\nthis will create following database tables.\n\n|Table name | Description |\n|---|---|\n| identity_roles | Storing roles information - it's using to group permissions together|\n| identity_permissions | Storing permissions information |\n| identity_permission_roles | Binding permissions to roles |\n| identity_roles_users | Binding users to roles, one user can have multiple roles |\n\n## How to use\n\nPermissions are using action strings to verify permissions. Action string looks like this\n`Plugin:/prefix/Controller/Action` or `__:/prefix/Controller/Action` when plugin is not available;\n\nYou can get action string via `CakephpIdentity\\Factories\\ActionFactory::getActionString($this-\u003erequest)` from any controller;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaymeow%2Fcakephp-identity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaymeow%2Fcakephp-identity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaymeow%2Fcakephp-identity/lists"}