Hide "Manage Columns" from certain groups
Moderators: Developer, Contributor
Hide "Manage Columns" from certain groups
I created a test account (reporter) to see what their view would look like. When I went to "My Account" I saw that they have access to "Manage Columns" and "Profiles" which I definitely do not want them to have access to at all. Where can I set the permissions so this doesn't show for anyone who is not at least a developer?
Thanks.
Thanks.
Re: Hide "Manage Columns" from certain groups
You can set the user to "protected" in UI of user management. So he will not get the "My account" link and is not able to change any setting.
To disable just the profiles add the following line to config_inc.php
There is is no option to prevent changing the columns.
To disable just the profiles add the following line to config_inc.php
Code: Select all
$g_add_profile_threshold = DEVELOPER;
-
- Posts: 35
- Joined: 22 Jul 2011, 12:38
Re: Hide "Manage Columns" from certain groups
It is my understanding that the "Manage Columns" and "Profiles" buttons that reporters (and every other user) sees under the "My Account" section only applies to that user. So when I added "Reporter" to my columns in the view page, no one else sees that change.
Re: Hide "Manage Columns" from certain groups
You are right, but I think that KenTech wants to be sure that all users get the same view and that a user is not able to hide a field which is considered to be important.andrea.mills wrote:It is my understanding that the "Manage Columns" and "Profiles" buttons that reporters (and every other user) sees under the "My Account" section only applies to that user. So when I added "Reporter" to my columns in the view page, no one else sees that change.
Let's wait for his feedback.
Re: Hide "Manage Columns" from certain groups
Thank you for that, but I don't want to limit the preferences altogether. Maybe I'll try the $g_add_profile_threshold variable.atrol wrote:You can set the user to "protected" in UI of user management. So he will not get the "My account" link and is not able to change any setting.
To disable just the profiles add the following line to config_inc.phpThere is is no option to prevent changing the columns.Code: Select all
$g_add_profile_threshold = DEVELOPER;
You know, I had that thought after I posted it. I'll test it a little more on my side. I just thought that whole tab was a bit confusing for our beta testers.andrea.mills wrote:It is my understanding that the "Manage Columns" and "Profiles" buttons that reporters (and every other user) sees under the "My Account" section only applies to that user. So when I added "Reporter" to my columns in the view page, no one else sees that change.
Re: Hide "Manage Columns" from certain groups
Yes, you are correct. We want to control what our beta testers see. They might hide an important field.atrol wrote:You are right, but I think that KenTech wants to be sure that all users get the same view and that a user is not able to hide a field which is considered to be important.andrea.mills wrote:It is my understanding that the "Manage Columns" and "Profiles" buttons that reporters (and every other user) sees under the "My Account" section only applies to that user. So when I added "Reporter" to my columns in the view page, no one else sees that change.
Let's wait for his feedback.
While I love all the features of Mantis, I wish some of these variables were built into the back end into a more friendly UI.
Re: Hide "Manage Columns" from certain groups
You are correct. Is there a variable for the manage columns threshold? I scoured the Mantis documentation but could not find any reference to even the variable for $g_add_profile_threshold variable.atrol wrote:You are right, but I think that KenTech wants to be sure that all users get the same view and that a user is not able to hide a field which is considered to be important.andrea.mills wrote:It is my understanding that the "Manage Columns" and "Profiles" buttons that reporters (and every other user) sees under the "My Account" section only applies to that user. So when I added "Reporter" to my columns in the view page, no one else sees that change.
Let's wait for his feedback.
Re: Hide "Manage Columns" from certain groups
Still noKenTech wrote:Is there a variable for the manage columns threshold?
atrol wrote: There is is no option to prevent changing the columns.
Re: Hide "Manage Columns" from certain groups
Developers don't like writing documentationsKenTech wrote:I scoured the Mantis documentation but could not find any reference to even the variable for $g_add_profile_threshold variable.
The best way to get an impression of MantisBT's configuration options is to read config_defaults_inc.php
Re: Hide "Manage Columns" from certain groups
Darn it! Any idea where in the code the option for the profile threshold is located? I might take a peek at the code for a possible mod.atrol wrote:Still noKenTech wrote:Is there a variable for the manage columns threshold?atrol wrote: There is is no option to prevent changing the columns.
Re: Hide "Manage Columns" from certain groups
Code: Select all
account_prof_menu_page.php
Line 48: access_ensure_global_level( config_get( 'add_profile_threshold' ) );
account_prof_update.php
Line 61: access_ensure_global_level( config_get( 'add_profile_threshold' ) );
adm_permissions_report.php
Line 140: echo get_capability_row( lang_get( 'add_profiles' ), config_get( 'add_profile_threshold' ) );
config_defaults_inc.php
Line 3618: $g_add_profile_threshold = REPORTER;
core\html_api.php
Line 1112: if( config_get ( 'enable_profiles' ) == ON && access_has_project_level( config_get( 'add_profile_threshold' ) ) ) {
Re: Hide "Manage Columns" from certain groups
In file: core\html_api.php
Add after
Append to: config.inc.php
So far it's working exactly how I wanted.
Code: Select all
Line 1112:if( config_get ( 'enable_profiles' ) == ON && access_has_project_level( config_get( 'add_profile_threshold' ) ) ) {
print_bracket_link( helper_mantis_url( $t_account_profile_menu_page ), lang_get( 'manage_profiles_link' ) );
}
Add after
Code: Select all
//Mod to control visibility of [Manage Columns] link
if( access_has_project_level( config_get( 'manage_columns_threshold' ) ) ) {
print_bracket_link( helper_mantis_url( $t_account_manage_columns_page ), lang_get( 'manage_columns_config' ) );
}
Code: Select all
$g_manage_columns_threshold = DEVELOPER;