Page 1 of 1

User groups

Posted: Wed Aug 18, 2004 3:31 pm
by visionmaster
Hello,

We're planning to programm a webinterface (backoffice) for call agents. What is the best or lets say most practical solution for solving the user rights problem? E.g. users of a group 1 are allowed to write, read, etc., users of another group have restricted rights.

Should I just have one field in my database like "dbGroup". A user that logs in belongs to a specific group. This field holds a string like 'admin', 'secretary', 'call agent'. I can then just read the content of this field, giving me info to which group the user belongs.

Is that all or is that to simple? Another solution from those database professionells out there?

Regards,
Rania

Posted: Wed Aug 18, 2004 3:34 pm
by Draco_03
A field you call it lie you want (example : rights)
and you set a right for the groups, if the right is 1 they can access this information etc...

in other word you just retreive the value of the field and in php you do a little if
and you display whatever you want depending on the value stored.

Posted: Fri Aug 20, 2004 9:49 pm
by fractalvibes
We have similar such things on our Intranet. For flexibility there are several tables such as:

Applications
AppId
AppName

Groups
GroupID
GroupName

AppGroupXref
AppId
GroupID
AccessLevel

Users
UserId
UserName

UserGroupXref
UserId
GroupID

and I think there is more - basic idea is users can belong to multiple groups that have differering access rights to different applications.
Perhaps Call Agents have full access to applications most pertinant to their
job, read-only access to other apps. The XYZ department has read-only access to the Call Agent apps, etc. But the call agent manager has more rights to more apps than the agents....that sort of thing. The more open-ended you can make it, the better - you can use for all sorts of things.

fv