LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-02-2010, 04:23 PM   #1
action_owl
Member
 
Registered: Jan 2009
Location: 127.0.0.1
Distribution: Fedora, CentOS, NetBSD
Posts: 115

Rep: Reputation: 17
Question Applying Linux Group Ideology to Web Applications


I have built a database driven web application that has a user and group system that works in a similiar way that Linux handles user access.

Breif explanation:

A users can access various resources, the resources are assigned to a single group and users can have many groups.

Users
Code:
id   name
--   -------
1    RedRanger	
2    GreenRanger
3    BlueRanger

Group Assignment
Code:
user	group
----	-----
1       33
1	44
1	55
2	33
2	44
3	33
3	44
3	55
3	66

Group description
Code:
gid	name
---	----
33	user
44	things
55	stuff
66	foo

Resource
Code:
name	group
----	-----
a	33
b	33
c	33
x	44		
y	55
z	66

RedRanger can access a, b, c, x and y but not z
GreenRanger can only access a, b, c and x
BlueRanger can access a, b, c, x, y and z


Lets say that RedRanger needs to be denied access to resource a

if I remove him from group 33 he can no longer access b or c which is no good.

The only alternative is to change a's group and add everyone else to the new group, this isn't so bad for 3 users, but what about 3,000?

If this situation occurs often there will soon be a mess of groups.

What is the best approach to this problem?

Thanks!
 
Old 12-02-2010, 05:40 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,300
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by action_owl View Post
The only alternative is to change a's group and add everyone else to the new group, this isn't so bad for 3 users, but what about 3,000?
If you automate the process, then the number should not matter.

Quote:
Originally Posted by action_owl View Post
If this situation occurs often there will soon be a mess of groups.
With your plan, if you have a mess of resources, then you need a mess of groups. If you rename "group" to "resource_id", then it might not feel like such a mess.
 
  


Reply

Tags
groups, permissions, users


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Ubuntu: when Linux ideology meets business LXer Syndicated Linux News 0 06-08-2010 08:11 AM
LXer: Linux Isn't Just Good Ideology -- It's Better Computing LXer Syndicated Linux News 0 12-23-2008 11:41 AM
LXer: SELinux - Highly Secured Web Hosting for Python-based Web Applications LXer Syndicated Linux News 0 05-28-2008 07:30 AM
LXer: Adobe Joins Linux Foundation With Focus on Linux for Web 2.0 Applications LXer Syndicated Linux News 0 03-31-2008 10:30 PM
Themes not applying to all applications DJ Shaji Fedora 1 05-26-2005 02:23 PM


All times are GMT -5. The time now is 01:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration