Features / Usability

Features / Usability

Re: Re: Re: Need to set up permissions for access to a web app

United Kingdom

> This is the part that I am a little confused on. I know that the permissions are stored in users_grouppermissions and in users_objectpermissions, but I am wondering how to generate the hash for the objectId in the users_objectpermissions table.
> Furthermore, am i correct in saying that the system queries your group everytime you go to a new page and checks to see if you have pernName that matches that object type and or objectId and then decides whether to let you in or not? and so, if that is the case all i need to do is to mod the db and write in tiki_p_xxx_xxx for my new web app? Sorry, i know i sound like an idiot, but I think that i am just a little confused... the source is well done, but it still gets a little tough to read sometime you know? wink
> -matt

Hi matt,

dont mess with the tables :-) Tiki does that for you when you in the admingroups. All you need to do is create your perms via the tiki.sql or tiki upgrade sql files into the users_permissions table. just do a insert with the correct values.

Then you can assign your permission via the tiki interface and it go into the group tables etc.

On your source code you want to do something like

if ($tiki_p_matts_permission ne 'y') {
  $msg ="You cant come here"
 // call the error.tpl
//run the script

and thats all there is to the tiki perms system.

you only need to insert your perm into the users_permissions table and then tiki will see it and make it available to the adminGroups admin screen.

Upcoming Events

No records to display

Why Register?

Register at tiki.org and you'll be able to use the account at any *.tiki.org site, thanks to the InterTiki feature. A valid email address is required to receive site notifications and occasional newsletters. You can opt out of these items at any time.