Skip to content

Instantly share code, notes, and snippets.

@blackymetal
Last active February 29, 2016 21:27
Show Gist options
  • Save blackymetal/5709048 to your computer and use it in GitHub Desktop.
Save blackymetal/5709048 to your computer and use it in GitHub Desktop.
Creating new aco and granting permissions from CakePHP's console
./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