Comments (5)
hmm
maybe put a wrapper there for it? cuz it will make it slower
let think about performance and then decide, I have no idae right now
Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com
On Shahrivar 1, 1392, at 9:27 AM, Jesse Burns [email protected] wrote:
It seems that most methods (mainly assignment methods) are not checking to see if we are trying to assign valid/existing Roles and Permissions.
Example:
The only Role/Permission in the database is the 'root' Role and 'root' Permission when we execute this,
$rbac->Assign(5, 5);
After execution the rolepermission table contains thisRoleID = 5, PermissionID = 5
Result:We now have a role->permission relation to non-existent roles and permissions.
Should we be checking for the existence of roles/permissions before trying to manipulate them?—
Reply to this email directly or view it on GitHub.
from rbac.
I was thinking about performance too.
I'll also have to think more about this before I can offer what I think is the best solution.
One thought off of the top of my head would be to create something similar to $rbac->Reset that will clean the database and remove orphan entries.
I see two problems with that:
- It's an after thought action that users will have to perform manually
- It will report inaccurate data for users that are generating reports or creating a GUI that lists Roles, Permissions and relationships between the two in order to assign roles to users.
Like I said, I'll think more on this and try to offer my best opinion/suggestion.
from rbac.
some of the functionality is used in the administrative interface, and the rest in the common application flow
Notice: This message is digitally signed, its source and integrity are verifiable.
If you mail client does not support S/MIME verification, it will display a file (smime.p7s), which includes the X.509 certificate and the signature body. Read more at Certified E-Mail with Comodo and Thunderbird in AbiusX.com
On Shahrivar 1, 1392, at 1:41 PM, Jesse Burns [email protected] wrote:
I was thinking about performance too.
I'll also have to think more about this before I can offer what I think is the best solution.
One thought off of the top of my head would be to create something similar to $rbac->Reset that will clean the database and remove orphan entries.
I see two problems with that:
It's an after thought action that users will have to perform manually
It will report inaccurate data for users that are generating reports or creating a GUI that lists Roles, Permissions and relationships between the two in order to assign roles to users.
Like I said, I'll think more on this and try to offer my best opinion/suggestion.—
Reply to this email directly or view it on GitHub.
from rbac.
That's a good point.
This really is the responsibility of the main application. PhpRbac will never create an orphan on it's own. If there are orphans, it is due to faulty administration code.
A helper method to remove orphans might be nice, but I think that's something we can put a hold on until we receive requests for something like that.
If you think that it's prudent, we can close this issue.
from rbac.
Closing issue due to the fact that this topic is outside of PhpRbac's scope.
from rbac.
Related Issues (20)
- The result of Rbac->Users->hasRole() is incorrect. HOT 1
- How Can I generate Graph Hierarchy? HOT 1
- How to add Rule (such as Author Rule) to an permission HOT 8
- How to move a {Entity} to other parent? HOT 4
- a role can have multiple children but only one direct parent HOT 2
- roles->remove() recursive not clean the relationship with Permission and User with its descendants
- Roles->permissions() & Permissions->roles() only return its directly related permissions and roles HOT 2
- Children() method run slowly HOT 15
- check the existence of a path HOT 6
- PhpRbac.net is down HOT 1
- Retrieve list of roles and permissions stored HOT 2
- Support PHP-Casbin as the authorization backend to provide ACL, RBAC, ABAC at the same time HOT 2
- php_rbac library HOT 1
- How does it work? HOT 13
- SQL server HOT 3
- PhpRbac.net is down. HOT 1
- Library Viability HOT 1
- Edit Roles and Permissions Depth? HOT 1
- Can't find table or something like that? HOT 3
- Roles->children is giving blank array HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rbac.