This topic is locked

Group Permissions in Security

3/27/2009 11:44:53 PM
PHPRunner General questions
M
mlapl1 author

I am using a CMS system called e107 which manages the registration of usernames and passwords. I am using the database in this system to provide username and password credentials for both the CMS site and also for accessing authoring systems written with the help of PHPRunner 5.0/5.1
Each user can be allocated to a Class of users. The use of classes enables to provide quite specific access to various parts of the CMS.
Now here is my problem. I want to use the classes stored in the database to provide different levels of access to the authoring systems I am writing using PHPRunner.
The problem is that each member of the site can have multiple user classes associated with them. The way this is achieved is by providing a single field which contains class information. The field is called user_class and the way in which it deals with multiple classes is by providing a string of numbers according to which class a member belongs to.
For instance a user can belong to class2, class4, and class7. This is represented in the user_class field by the string "2,4,7" (without the quotes of course). Another user may belong to Class1 and Class4 (represented by "1,4"). Let us say that I am interested in giving access to my PHPRunner site only to people who belong to Class4. Is there some way that I can process the string stored in user_class so that the login process recognises that the number "4" is stored in the user's user_class entry? Of course, it would be much simpler if I could use a field containing a single userclass definition but that is simply not the case here as the whole idea is to be able to create any number of userclasses at will without the need to create new tables in the database.
Has anyone else attempted to do this kind of thing? And, if yo, what solution did you implement. Your help will be appreciated.
Thanks very much

Andrew

J
Jane 3/31/2009

Andrew,
unfortunately PHPRunner do not support multiple values in the Group fields for static permissions.

As workaround use dynamic permissions on the Security tab. In this case PHPRunner creates additional tables with list of users and list of classes and you can assign two or more classes for each user.