Created
March 21, 2016 11:07
-
-
Save jenkoian/5fda9fad505e12186bb5 to your computer and use it in GitHub Desktop.
PermissionUrlMap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
class PermissionUrlMap | |
{ | |
/** | |
* Order matters, in that it will match the first one it comes across. So put more specific URLs higher up. | |
* | |
* @var array Format is [‘permission’ => ‘/path/to/page’] | |
*/ | |
public static $permissionMap = [ | |
‘add_content’ => ‘^/content/add’, | |
‘moderate_content’ => ‘^/content/moderate’, | |
‘edit_user’ => ‘^/user/edit’ | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment