Loading...
 
Skip to main content

Development


How to add a new right

posts: 14 Austria

Hi!

I was trying to add a new right in the database
with
INSERT INTO users_permissions (permName, permDesc, level,type) VALUES ('tiki_p_tasks_send', 'Can send tasks to other users', 'registered', 'user');

And now I want to check this right in tiki-user_tasks.php with

if ($tiki_p_tasks_send != 'y') {

But it didn't worked so I mad a workaround with my own mysql statmend.
Does somebody know how I can check this right, I am shure there is a simple way

Thanks
Markus

posts: 1092

Never forget to clean the cache ... until we change that 😑
admin -> admin system -> temp/cache
sylvie

posts: 14 Austria

So you think there is nothing more to do as adding
1.) Adding a new right:
INSERT INTO users_permissions (permName, permDesc, level,type) VALUES ('tiki_p_tasks_send', 'Can send tasks to other users', 'registered', 'user');
2.) assign the right to a group with the tiki-admingroups.php site

But for what are this statments?
INSERT INTO tiki_menu_options (menuId,type,name,url,position,section,perm,groupname) VALUES (42,'o','Tasks','tiki-user_tasks.php',65,'feature_tasks','tiki_p_tasks','Registered');

posts: 1092

It is the only one... The code will set up the value, the admins will inherit the perm...
In menu_options it is only if you want to control the display of a line of a menu with a perm
Each perm in the perm column must be satisfied to display the menu option.

posts: 14 Austria

Thanks for the quick help
Markus😀


posts: 32 Iran

I wonder if the `insert` SQL commands must be ran handy or there is a UI somewhere in the tw for it?

I have the same problem, too. I don't know how I can create new permissions and where the relevant UI resides!!

Any help would be highly appreciated!