SQL Recipes
A FREE cookbook for SQL queries and examples
Register FAQ Search Today's Posts Mark Forums Read

Database Design Find articles on variouse database design topics

Go Back   SQL Recipes a FREE cookbook of SQL queries and examples > Articles > Database Design

Reply
 
LinkBack (50) Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 5.00 average.
  #41 (permalink)  
Old 10-04-2007, 04:11 PM
mithras mithras is offline
Junior Member
 
Join Date: Sep 2007
Posts: 3
mithras is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hmm, your right. We are a small student corporation, so we don't need many groups (though we have quite some commissions, about 26 for 230 members).

Now I've thought about this system for some time, and my cms has a modular structure. It's build only with plugins, so I thought the relation domains -> plugins isn't that hard.
Another thing is the object relation. Each plugin can have several objects, but I don't want to store all the objects from all plugins into one table. Then my modular system is going to be completely messed up.
Is there a solution to have a table for every plugin? E.g. my gallery has tables plugin_gallery_categories, plugin_gallery_albums, plugin_gallery_photos and plugin_gallery_reactions.

Do you think, is it alright to create an additional table "plugin_gallery_objects", which replaces the complete rbac_objects and rbac_domain_has_objects table structure?
I think the queries are harder to create with this solution, but couldn't think of another. Of course, it is still possible to store the objects into a seperate object table and create a plugin_has_object table, but don't think that is a clean solution. What do you think?

Thanks for your (previous and upcoming) advice!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #42 (permalink)  
Old 10-08-2007, 09:52 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 93
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by mithras View Post
Hmm, your right. We are a small student corporation, so we don't need many groups (though we have quite some commissions, about 26 for 230 members).

Now I've thought about this system for some time, and my cms has a modular structure. It's build only with plugins, so I thought the relation domains -> plugins isn't that hard.
Another thing is the object relation. Each plugin can have several objects, but I don't want to store all the objects from all plugins into one table. Then my modular system is going to be completely messed up.
I am not sure what you want to achieve but I don't think it will mess things up if you store all the information in one table.
What actions are you thinking of using on the objects?

Quote:

Is there a solution to have a table for every plugin? E.g. my gallery has tables plugin_gallery_categories, plugin_gallery_albums, plugin_gallery_photos and plugin_gallery_reactions.
OK I see what you mean now... :-)

I would give the domains and objects relevant names like:

Domain: plugin_gallery_categories
Object: pgc_nature
Object: pgc_city
Object: pgc_people etc...

Domain: plugin_gallery_albums
Object: pga_2007
Object: pga_2006 etc...


For the photos and reactions I don't see the need to create specific objects. I would leave the domain singular. (i.e the domain and the object would have the same name.)

Having said that you may want to create some objects based on the user who uploaded the photos.
i.e.

Domain: plugin_gallery_photos
Object: pgp_username1
Object: pgp_username2

This would allow you to control what other members are allowed to do with other members photos. (I.e. leave comments, delete, rename, view, etc...)

[/quote]Do you think, is it alright to create an additional table "plugin_gallery_objects", which replaces the complete rbac_objects and rbac_domain_has_objects table structure?

[/quote]You understand your problem better than I do, so it is hard for me to make a comment. At this stage I don't see the need to change the structure of the database,... but I may be wrong ;-)

The whole idea behind sharing this RBAC structure with the community and releasing it under the MIT license is to allow people to improve and change it to meet their needs. Once you get the general idea of how it works you can customise it as much as you like.

Quote:

I think the queries are harder to create with this solution, but couldn't think of another.
I think this may be messy. Are the comments I wrote above of any help?

Quote:

Of course, it is still possible to store the objects into a seperate object table and create a plugin_has_object table, but don't think that is a clean solution. What do you think?

Thanks for your (previous and upcoming) advice!
Let me know if what I wrote makes any sense to you. It is hard for me to really comment on your structure because I am not 100% sure of what you want to do.

Cheers,

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #43 (permalink)  
Old 03-11-2008, 03:33 PM
trash trash is offline
Junior Member
 
Join Date: Dec 2007
Posts: 1
trash is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi I was involved in a project designing a desktop and laptop deployment tool. One issue was always to assign the correct user rights for web pages and menu entries. I saw your post one year ago and I'll try to implement it in MS SQL 2005/ASP.NET.


Keep you informed if I'll make progress. By the way GREAT Article.

Cheers
Joachim
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #44 (permalink)  
Old 03-12-2008, 01:58 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 93
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Trash,

If you have any questions, post them here on the forum.
Glad you liked the article... at least I know someone found it worth reading ;-)

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #45 (permalink)  
Old 07-03-2008, 02:42 AM
superj superj is offline
Junior Member
 
Join Date: Jun 2008
Posts: 3
superj is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

I am having the hardest time installing the DB. I created an empty database and set the user name in the config.php. The user has access to the database. I run the rb.sql and I get a user access error. If I paste the contents of rb.sql in the sql window of phpmyadmin the tables are created but when I get to the end of the file setting up the foreign keys I get (er121). For those of you who have installed successfully can you please enlighten me on how you did it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #46 (permalink)  
Old 07-03-2008, 08:10 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 93
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by superj View Post
I am having the hardest time installing the DB. I created an empty database and set the user name in the config.php. The user has access to the database. I run the rb.sql and I get a user access error. If I paste the contents of rb.sql in the sql window of phpmyadmin the tables are created but when I get to the end of the file setting up the foreign keys I get (er121). For those of you who have installed successfully can you please enlighten me on how you did it?
I think there is a data type mismatch between a foreign key and its corresponding primary key. I think one is int(11) and the other is int(10) or something like that. When I get the time I will have a closer look.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #47 (permalink)  
Old 07-03-2008, 10:54 PM
superj superj is offline
Junior Member
 
Join Date: Jun 2008
Posts: 3
superj is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

That would be really cool ben. I cant wait to start using it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #48 (permalink)  
Old 07-06-2008, 09:54 PM
superj superj is offline
Junior Member
 
Join Date: Jun 2008
Posts: 3
superj is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

ben,
have you had a chance to look at the error I posted? Has anyone else had installation issues?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #49 (permalink)  
Old 07-08-2008, 12:13 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 93
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by superj View Post
ben,
have you had a chance to look at the error I posted? Has anyone else had installation issues?
OK, had a chance to look into this. I ran the rbac.sql file without a problem, so I think the problem might be that you don't have the innodb engine enabled in MySQL. Could this be the case. If you are still having problems, could you please paste the error message to this forum.

Thanks,

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #50 (permalink)  
Old 07-12-2008, 04:07 AM
koveras225 koveras225 is offline
Junior Member
 
Join Date: Jul 2008
Posts: 1
koveras225 is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

I just downloaded this a few days ago and was exploring the code to get a better idea of how it works. I noticed something that seems rather odd and no matter what values I throw at it can't make any sense of it.

Code:
else if ($new_weight == $weight && (int) $is_allowed === 1 && (int) $is_allowed === 0){
This line in class.rbac_bv.php as far as I can tell, will never return true and run the code within the block. Perhaps I'm wrong, although I've just spent the last hour throwing values at it and haven't got it to return true. Is it an error, a mistype of !== or something perhaps? Or am I completely missing something...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.sqlrecipes.com/database_design/fine_grained_role_based_access_control_rbac_system-3/
Posted By For Type Date
RBAC - Forum PHP.pl This thread Refback 06-04-2008 03:11 PM
RBAC - Forum PHP.pl This thread Refback 05-23-2008 02:22 PM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 05-05-2008 07:07 AM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 05-03-2008 03:57 PM
RBAC - Forum PHP.pl This thread Refback 05-02-2008 03:46 PM
Discover From Your Favorite Topic or Web Page: rbac This thread Refback 04-18-2008 03:58 AM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-17-2008 11:12 PM
Joomla! Community Forum • View topic - [15]Access Management in Joomla! 1.6 This thread Refback 04-10-2008 08:51 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 01:26 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 12:34 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 12:32 PM
[PHP/SQL] Ideale rechtensysteem - Programming - GoT This thread Refback 04-07-2008 12:31 PM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 03-21-2008 12:00 PM
Qwait's favorite web pages, page 6 - StumbleUpon This thread Refback 03-20-2008 02:35 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 03-06-2008 05:17 PM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 03-01-2008 02:30 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-29-2008 12:59 PM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-29-2008 10:44 AM
Joomla! Community Forum • View topic - I want better ACL This thread Refback 02-25-2008 12:48 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-22-2008 09:46 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 04:37 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 02:29 PM
RBAC - Forum PHP.pl This thread Refback 02-20-2008 02:17 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-08-2008 04:12 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT This thread Refback 02-05-2008 09:17 AM
atakan.dogan's bookmarks tagged with This thread Refback 01-10-2008 07:16 AM
Pages tagged with This thread Refback 01-08-2008 01:01 PM
atakan.dogan's bookmarks on del.icio.us This thread Refback 01-07-2008 09:26 AM
heberm's bookmarks tagged with This thread Refback 01-06-2008 10:12 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 01-06-2008 07:05 PM
qWikiOffice Blog » Blog Archive » Database Design This thread Refback 01-05-2008 07:03 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 12-25-2007 10:00 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 12-22-2007 02:39 PM
amii's bookmarks on del.icio.us This thread Refback 12-21-2007 02:02 PM
ECRM:AccessControl - FaithHighway Wiki This thread Refback 12-19-2007 10:34 PM
Which is best for ACL? | CodeIgniter Forums This thread Refback 12-02-2007 03:45 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 11-10-2007 03:26 PM
StumbleUpon » deepakpradhan's web site reviews and blog This thread Refback 11-04-2007 12:18 AM
scorpiol's bookmarks on del.icio.us This thread Refback 10-21-2007 10:23 AM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-19-2007 02:26 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-18-2007 09:38 PM
Rechtensysteem voor website - Software Engineering & Architecture - GoT - Powered by React This thread Refback 10-18-2007 09:36 PM
mithras86's bookmarks tagged with This thread Refback 09-28-2007 10:06 PM
mithras86's bookmarks on del.icio.us This thread Refback 09-24-2007 02:22 PM
heberm's bookmarks on del.icio.us This thread Refback 08-30-2007 01:46 PM
onisemus' bookmarks tagged with This thread Refback 08-14-2007 10:15 PM
onisemus' bookmarks on del.icio.us This thread Refback 08-02-2007 03:40 PM