문제

I have an application which will do role based and activity based authorization and access control , now have some needs for "user" based settings.

Have any open source third party library in php, which I can use or refer? Or any easy methodology I can adapt?

도움이 되었습니까?

해결책

I hope I got your question right but here is my idea:
I assume you are using some form of database.

Idea 1:
Safe a set of rights with every user (e.g. boolean values "edit", "create" or something like that)

Pro:
High flexebility in which user is allowed to do what.
Cons:
Every user has his own set of rights, thus you have quite a lot of data floating around your database.

Idea 2:
Safe a set of groups or roles wich get different rights and you assign a group or a role to a user.

Pros:
Rather low amount of data.
Cons:
Lower flexebility if you don't want to make a group for every user wich would lead to Idea 1.


I hope that helped and I hope I din't get your question wrong!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top