This topic is locked

Specific question regarding dynamic permissions

3/18/2008 11:47:28 PM
PHPRunner General questions
G
grh author

I am using phprunner 4.2 with dynamic permissions enabled...however, I still need some clarification.
If userA is a member of groupA and groupB .....and both groupA and groupB have diff rights to tableC ..... how is the final rights determined?
Also, what specific variable holds the group value .... is it a session variable?..... or the multiple groups the user may be a member of ??
Thanks.

Alexey admin 3/19/2008

Gregory,
the specific user rights is a union of rigths of all group the user belongs to.

I.e. if the user is a member of groupA and groupB, groupA has List permissions on tableC and groupB has Add then the user would have both List and Add.
To obtain a list of groups the user belongs to run the following SQL query:

select * from ..._ugmembers where UserName='username'



The username of currently logged in user is saved in $_SESSION["UserID"]

G
grh author 3/19/2008

Gregory,

the specific user rights is a union of rigths of all group the user belongs to.

I.e. if the user is a member of groupA and groupB, groupA has List permissions on tableC and groupB has Add then the user would have both List and Add.
To obtain a list of groups the user belongs to run the following SQL query:
The username of currently logged in user is saved in $_SESSION["UserID"]


Thank you for that clarification.
Now, I have another question related to this topic. If all user rights are pulled from db rights tables....can we still provide guest level access. Or, does each user need to belong some "guest" group?
Thanks!

Alexey admin 3/19/2008

Gregory,
there are 2 special groups on the Permissions page

<Guest> and <Default>
Guest group represents users not logged in.

Check off tables and actions allowed without login there.
If the user is not a member of any group it has permissions defined for <Default> group.
Is this what you asking for ?

G
grh author 3/19/2008

Gregory,

there are 2 special groups on the Permissions page

<Guest> and <Default>
Guest group represents users not logged in.

Check off tables and actions allowed without login there.
If the user is not a member of any group it has permissions defined for <Default> group.
Is this what you asking for ?


Yes, thank you.

G
grh author 3/19/2008



Yes, thank you.



Alexey, ok....no it is not clear
I went into the application and when you use dynamic permissions the option is not available for guest and default....what am I doing wrong?
thanks

Alexey admin 3/20/2008

Gregory,
when you use Dynamic permissions the <Guest> and <Dynamic> groups are on the Permissions PHP page

Build the project, log in as admin and click Admin Area link.