Last active
February 29, 2016 21:27
-
-
Save blackymetal/5709048 to your computer and use it in GitHub Desktop.
Creating new aco and granting permissions from CakePHP's console
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
./Console/cake acl create aco Usuarios admin_switch | |
./Console/cake acl create aco Usuarios super_switch | |
./Console/cake acl grant Group.2 Usuarios/admin_switch | |
#View AC= | |
./Console/cake acl view aco Promociones | |
# Create aro on root | |
./Console/cake acl create aro / Group.1 | |
# Create aro User.1 in Group.1 | |
./Console/cake acl create aro Group.1 User.1 | |
# Setparent aro Group.6 to User.8 | |
./Console/cake acl setparent aro User.8 Group.6 | |
# Check permission | |
./Console/cake acl check Group.5 Pedidosonlines/admin_historico read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment