Custom access level

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
mnemonicator
Posts: 15
Joined: 28 May 2018, 13:56

Custom access level

Post by mnemonicator »

Hello colleagues, i am using MantisBT 2.24.2 and trying to setup custom access level.

I set a new constant in a custom_constants_inc.php

Code: Select all

<?php
define('EDITOR',45);
?>
then i add next test to the config_inc.php

Code: Select all

$g_access_levels_enum_string = '10:viewer,25:reporter,40:updater,45:editor,55:developer,70:manager,90:administrator';
and i also modify strings_english.txt

Code: Select all

# Enum Strings
$s_access_levels_enum_string = '10:viewer,25:reporter,40:updater,45:editor,55:developer,70:manager,90:administrator';
All lokks good, i see new access level.

Now i trying to change this default constant $g_stored_query_create_threshold = DEVELOPER;

so i add next text to the config_inc.php

$g_stored_query_create_threshold = editor;

But i see that every role is able to create filters, i tried to change this to standard role updater, but still every role from viewer to administrator is able to create filters.

What's wrong and how to fix this?

thank you.
atrol
Site Admin
Posts: 7864
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Custom access level

Post by atrol »

Didn't have a deeper look, but this is certainly wrong
mnemonicator wrote:
24 Sep 2020, 21:41
$g_stored_query_create_threshold = editor;
editor is not a defined constant, you have to change it to EDITOR
mnemonicator wrote:
24 Sep 2020, 21:41
and i also modify strings_english.txt
Changing original files of Mantis is not recommended, as you will loose the changes after an upgrade.
String customization should be done in custom_strings_inc.php
Please use Search before posting and read the Manual
mnemonicator
Posts: 15
Joined: 28 May 2018, 13:56

Re: Custom access level

Post by mnemonicator »

Thank you very much, this fix my problem!
Post Reply