Reputation: 1243
Because there is so little documentation, it's been hard learning the ins and outs of Symfony2's ACL system, but so far I've managed to understand most of the concepts. However, there is one problem...
I would like to be able to add a permission ADMIN
that inherits the same conditions as OWNER
for use with ACL. My goal would be to designate admin controls within the post page, but also give admins access to other controls granted to owners.
If anyone can provide clear examples, documentation, or links as assistance would be greatly appreciated and even a nudge in the right path is welcomed.
Upvotes: 2
Views: 283
Reputation: 901
From the official documentation
$builder = new MaskBuilder();
$builder
->add('owner')
;
$mask = $builder->get();
$acl->insertObjectAce(new UserSecurityIdentity('user1'), $mask);
And then apply the same mask to your "ADMIN" user.
Is that what you're looking for? Hope that helped a bit anyway ;)
Upvotes: 1