-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group-only seem to doesn't work #30
Comments
Just out of curiosity, try: $this->addBehavior('Acl.Acl', [
'type' => 'requester'
]);
$this->eventManager()->detach($this->behaviors()->get('Acl')); |
I just tested and it changed nothing. Edit: I found the problem, i do some tests before to post the problem. |
Ok, so the problem is this line : \Cake\Core\App::className(\Cake\Utility\Inflector::singularize($name), 'Model/Entity') and it return the correct entity I saw this problem by checking again the Cake2 ACL : |
We can't assume that people will always have concrete Entity classes. It might be best to get the correct Table class and use that to get an entity instance: $table = TableRegistry::get($name);
$entityClass = $table->entityClass(); |
@markstory Yes you're right, thank for your help ! I close because #31 is open now. |
Hello,
Because this plugin has been ported from Cake2, i assume that the "Group-only" must work as well, but no.
I have followed the instruction here : http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html#group-only-acl but it actually doesn't work.
The key
'enabled' => false
look like it isn't checked. I have also check all ACL releated files in Cake2 and i saw nothing about that.In my UsersTable :
In my GroupTable :
In my UserEntity :
In my GroupEntity :
In my database the aros table look like that :
And i got this error when i try to make a request:
Where
1
is theuser_id
and not thegroup_id
.I have also noticed that when i add an user, it doesn't create the ARO, so that look like to work well.
The text was updated successfully, but these errors were encountered: