-
Notifications
You must be signed in to change notification settings - Fork 143
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
How to set permissions to several database entries? #86
Comments
Hello,
|
Ok, thx so far. In this case, I don't get it right. How do I implement this hierarchy? For example |
The hierarchy of products should have nothing to do with the users that can access them. Separation of concepts is of key importance.
|
I also encountered a similar problem. After checking, it was found that there was an error in setup.php. |
Hi AbiusX,
I have a database with over 15.000 products. Some of these products are maintained by different agencies. If I got it right, I have do create a permission for every of my 15.000 products, to check if a user with id
$user_id
is allowed to edit a product with the id$product_id
? Because when I do a check like$rbac->check('edit_product_' . $product_id, $user_id);
and there is no permission 'edit_product_1234' (for example), the script breaks with an exeption:
throw new RbacPermissionNotFoundException ( "The permission '{$Permission}' not found." );
In this case, your class should return, that the user has no permission to edit this product. So it wouldn't be necessary to create a permission for every product.
The text was updated successfully, but these errors were encountered: