{"id":20077582,"url":"https://github.com/digitaledgeit/zf2-authorisation-module","last_synced_at":"2026-05-12T18:11:37.258Z","repository":{"id":56968814,"uuid":"14682414","full_name":"digitaledgeit/zf2-authorisation-module","owner":"digitaledgeit","description":"Digital Edge IT authorisation module for Zend Framework v2","archived":false,"fork":false,"pushed_at":"2014-11-04T10:58:44.000Z","size":188,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T12:03:22.173Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitaledgeit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-25T10:15:35.000Z","updated_at":"2014-05-18T21:54:12.000Z","dependencies_parsed_at":"2022-08-21T06:40:24.001Z","dependency_job_id":null,"html_url":"https://github.com/digitaledgeit/zf2-authorisation-module","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fzf2-authorisation-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fzf2-authorisation-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fzf2-authorisation-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fzf2-authorisation-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaledgeit","download_url":"https://codeload.github.com/digitaledgeit/zf2-authorisation-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241509618,"owners_count":19974071,"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":[],"created_at":"2024-11-13T15:09:05.468Z","updated_at":"2026-05-12T18:11:32.223Z","avatar_url":"https://github.com/digitaledgeit.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Zend Framework 2 module: DeitAuthorisationModule #\n\nThis module is a simple reusable access control module which restricts access to \nyour controllers based on the user's role.\n\nTo restrict access to your controllers, add a new config entry in your module:\n\n\t'deit_authorisation' =\u003e array(\n\n\t\t/**\n\t\t * The service name of the unauthorised strategy\n\t\t * @type    string\n\t\t */\n\t\t'strategy'  =\u003e 'DeitAuthorisationModule\\View\\ViewStrategy',\n\n\t\t/**\n\t\t * The view template to display when the user is unauthorised\n\t\t * @type    string\n\t\t */\n\t\t'template'  =\u003e 'error/401',\n\n\t\t/**\n\t\t * The route to redirect to when the user is unauthorised\n\t\t * @type    string\n\t\t */\n\t\t'route'     =\u003e 'log-in',\n\n\t\t/**\n\t\t * The access control list\n\t\t * @var array\n\t\t */\n\t\t'acl'       =\u003e array(\n\t\t\t'roles'     =\u003e array(\n\t\t\t\t'guest',\n\t\t\t\t'admin' =\u003e 'guest'                                              //the admin role inherits guest permissions\n\t\t\t),\n\t\t\t'resources' =\u003e array(\n\t\t\t\t'DeitAuthenticationModule\\\\Controller\\\\Authentication\\\\log-in',\n\t\t\t\t'DeitAuthenticationModule\\\\Controller\\\\Authentication\\\\log-out',\n\t\t\t\t'DeitAuthenticationModule\\\\Controller\\\\Authentication',\n\t\t\t\t'DeitAuthenticationModule',\n\t\t\t\t'Application',\n\t\t\t),\n\t\t\t'rules'     =\u003e array(\n\t\t\t\t'allow'     =\u003e array(\n\t\t\t\t\t'DeitAuthenticationModule\\\\Controller\\\\Authentication\\\\log-in'  =\u003e 'guest',  //restrict access to a specific action\n\t\t\t\t\t'DeitAuthenticationModule\\\\Controller\\\\Authentication\\\\log-out' =\u003e 'admin' ,\n\t\t\t\t\t//'DeitAuthenticationModule\\\\Controller\\\\Authentication'        =\u003e 'admin',  //restrict access to a specific controller\n\t\t\t\t\t'Application'                                                   =\u003e 'admin',  //restrict access to a specific module\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\n\t\t/**\n\t\t * The default role used when no authenticated identity is present or the identity's role can't be discovered\n\t\t * @var string\n\t\t */\n\t\t'default_role'  =\u003e 'guest',\n\n\t\t/**\n\t\t * The role resolver used to discover the role of an identity when preset\n\t\t * @var callable\n\t\t */\n\t\t'role_resolver' =\u003e function($identity) {\n\t\t\tif ($identity) {                                                     //this will be different if you have multiple roles which your authenticated users can be\n\t\t\t\treturn 'admin';\n\t\t\t} else {\n\t\t\t\treturn 'guest';\n\t\t\t}\n\t\t},\n\n\t),","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fzf2-authorisation-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaledgeit%2Fzf2-authorisation-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fzf2-authorisation-module/lists"}