Page 1 of 1

Add the" Automatically included in private projects" option for a users with viewer acces level.

Posted: 22 Feb 2018, 17:48
by lunalagosmutual
Hi guys,

I have the next problem.

In the version of Mantis 2.11.1 i want assign of the visit/viewer user the option "Automatically included in private projects" but without change the other options for that acces level.
I tried add in at the config_inc.php file the parameter
$g_private_project_threshold = VIEWER;
but when i make that, the all others profiles of acces level same take the option "Automatically included in private projects" and i want this option only for viewer users and administrator users, not for users in the middle.I don't kwon if this is posible, because apparently the level more low affect at the level acces higher.

The option more "easy" is assign manually, all the projects at the new visit user. That is fast using a one query in the server of BD, but i want what this is generic for the new users whith the visit access level.


I hope you can help me, for now i dont have more ideas.

Thanks!!

Re: Add the" Automatically included in private projects" option for a users with viewer acces level.

Posted: 23 Feb 2018, 09:08
by rkarmann
Hi,

Adding manually users to your private project is safer. But if you really want it to be done automatically...

I recommand to set a new access level in your Mantis installation. In fact, access levels are ordered like numbers :

-10 -> viewer
-25 -> reporter
-40 -> updater
-55 -> developer
-70 -> manager
-90 -> administrator

If you set private project threshold to viewer (10), it means that all users that have a similar or higher access level (10) would be able to see the private project.

In your config_inc.php file, set a new access level, e.g:

Code: Select all

$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,70:manager,80:customViewer,90:administrator';
Here you can see that I add a new access level named : customViewer (linked to the 80). Next, you have to modify the translation string :

Go in lang > strings_english (or whatever is your language) and add the specific access level in the string named:

Code: Select all

$s_access_levels_enum_string = '10:viewer,25:reporter,40:updater,55:developer,70:manager,80:customViewer,90:administrator';
Be aware that such a modification will give users with customViewer access level same rights than a manager (they might be able to do things you don't want them to...).

Regards,

RK

Re: Add the" Automatically included in private projects" option for a users with viewer acces level.

Posted: 23 Feb 2018, 09:22
by atrol
rkarmann wrote: 23 Feb 2018, 09:08 Go in lang > strings_english (or whatever is your language) and add the specific access level in the string named:
Please don't. Such kind of customization should be done in file custom_strings_inc.php

Re: Add the" Automatically included in private projects" option for a users with viewer acces level.

Posted: 23 Feb 2018, 09:29
by rkarmann
Sorry, I missed that :P