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.
  #51 (permalink)  
Old 07-12-2008, 08:39 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by koveras225 View Post
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...
Good catch, you are right the line will always return false.

The code is actually redundant and will not affect the results. You can safely remove the code snippet:

Code:
else if ($new_weight == $weight && (int) $is_allowed === 1 && (int) $conn->is_allowed === 0){
                
                // We always give more weight to denials.
                $is_allowed = $conn->is_allowed; // i.e. set to FALSE or 0
                $weight = $new_weight;
            }
If you do not remove it, it will not change anything either, it is just dead code that I forgot to remove.

Thanks for the heads up!

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #52 (permalink)  
Old 09-23-2008, 10:10 PM
FarshadV FarshadV is offline
Junior Member
 
Join Date: Apr 2008
Posts: 4
FarshadV is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

I am attempting to see if your system can be used for my current project. I am in the process of creating a Drawing (AutoCAD) repository viwer which will have around 5,000 drawings (one per db row), and I need to be able to grant access to users based on their group(s) and permissions to view these drawings. Some users will have access to all, and some will not. Can I use your system to efficiently get a list of ALL drawings (rows) which a given user of a given group would have access to?


Best Regards,

Farshad Vossoughi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #53 (permalink)  
Old 09-24-2008, 06:50 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by FarshadV View Post
I am attempting to see if your system can be used for my current project. I am in the process of creating a Drawing (AutoCAD) repository viwer which will have around 5,000 drawings (one per db row), and I need to be able to grant access to users based on their group(s) and permissions to view these drawings. Some users will have access to all, and some will not. Can I use your system to efficiently get a list of ALL drawings (rows) which a given user of a given group would have access to?


Best Regards,

Farshad Vossoughi
Yes, this is exactly what this system is designed to do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #54 (permalink)  
Old 09-24-2008, 11:43 AM
FarshadV FarshadV is offline
Junior Member
 
Join Date: Apr 2008
Posts: 4
FarshadV is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Thank you ben - Will I have to make 5,000 individual calls to see if a user can view a each row? Also, do you know if your system has been translated/migrated to any other programming language (e.g. Delphi)?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #55 (permalink)  
Old 09-24-2008, 12:29 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by FarshadV View Post
Thank you ben - Will I have to make 5,000 individual calls to see if a user can view a each row?
No. You only need to make one call.

With one call you can find out all the drawings a particular user is allowed to access.

OR, if you want, you can also (with one call) find out all the users which are allowed to access a particular drawing.

Quote:
Also, do you know if your system has been translated/migrated to any other programming language (e.g. Delphi)?
I am not aware of anyone working on a Delphi port. I know someone working on a Java port. Having said that making the calls and finding out who has access to what is really easy. If you look at the PHP files you will see what I mean.
The administration side of things can be a bit tricky, but certainly not difficult
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #56 (permalink)  
Old 09-24-2008, 08:49 PM
FarshadV FarshadV is offline
Junior Member
 
Join Date: Apr 2008
Posts: 4
FarshadV is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Do I have your permission to port your work to Delphi?
I am not a web programmer but I think I can follow what has been done.
Is this forum the only way to contact you?

Farshad
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #57 (permalink)  
Old 09-25-2008, 08:56 AM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Quote:
Originally Posted by FarshadV View Post
Do I have your permission to port your work to Delphi?
I am not a web programmer but I think I can follow what has been done.
Is this forum the only way to contact you?

Farshad

Yes, you have permission to port this system to Delphi. The license is actually very "unrestrictive". If you intend to distribute your work, a mention of this website would be nice :-)

If you have a look at the PHP file headers you can contact me by email.

Cheers,

Ben
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #58 (permalink)  
Old 10-02-2008, 07:20 PM
Dimitar
 
Posts: n/a
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hello,

I am curious, how are you going to enter 5000 items in the RBAC tables?

Best Regards,

Dimitar

Quote:
Originally Posted by FarshadV View Post
I am attempting to see if your system can be used for my current project. I am in the process of creating a Drawing (AutoCAD) repository viwer which will have around 5,000 drawings (one per db row), and I need to be able to grant access to users based on their group(s) and permissions to view these drawings. Some users will have access to all, and some will not. Can I use your system to efficiently get a list of ALL drawings (rows) which a given user of a given group would have access to?


Best Regards,

Farshad Vossoughi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Edit/Delete Message Reply With Quote
  #59 (permalink)  
Old 10-04-2008, 10:30 AM
swamp swamp is offline
Junior Member
 
Join Date: Sep 2008
Posts: 2
swamp is on a distinguished road
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Ben,

First I must tell you one hell of example this yours rbac_admin, indeed impressive.
After spending last couple of days trying to understand most of it and hacking along I rewrote some parts of
error class and added some improvements here and there.
Now it's possible to dump vars (array, object, resource) in form of collapsible, expandable html tables with
complete call flow until dump call. Same functionality goes for error reporting too.

Screenshot:
snapshot1.jpg

Is it appropriate to post those changes on this forum?

Cheers,
Sinisa Vujic
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #60 (permalink)  
Old 10-04-2008, 09:34 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default Re: Fine Grained Role Based Access Control (RBAC) system

Hi Sinisa,

Thanks for taking a look at the code.
Quote:
Is it appropriate to post those changes on this forum?
Sure. Your mods look really good, I am sure others would appreciate it as well.

Cheers,

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