Hide "Manage Columns" from certain groups

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Hide "Manage Columns" from certain groups

Post by KenTech »

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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Hide "Manage Columns" from certain groups

Post by atrol »

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

Code: Select all

$g_add_profile_threshold = DEVELOPER;
There is is no option to prevent changing the columns.
Please use Search before posting and read the Manual
andrea.mills
Posts: 35
Joined: 22 Jul 2011, 12:38

Re: Hide "Manage Columns" from certain groups

Post by andrea.mills »

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.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Hide "Manage Columns" from certain groups

Post by atrol »

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.
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.
Let's wait for his feedback.
Please use Search before posting and read the Manual
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Re: Hide "Manage Columns" from certain groups

Post by KenTech »

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.php

Code: Select all

$g_add_profile_threshold = DEVELOPER;
There is is no option to prevent changing the columns.
Thank you for that, but I don't want to limit the preferences altogether. Maybe I'll try the $g_add_profile_threshold variable.
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.
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.
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Re: Hide "Manage Columns" from certain groups

Post by KenTech »

atrol wrote:
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.
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.
Let's wait for his feedback.
Yes, you are correct. We want to control what our beta testers see. They might hide an important field.

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.
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Re: Hide "Manage Columns" from certain groups

Post by KenTech »

atrol wrote:
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.
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.
Let's wait for his feedback.
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
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Hide "Manage Columns" from certain groups

Post by atrol »

KenTech wrote:Is there a variable for the manage columns threshold?
Still no ;-)
atrol wrote: There is is no option to prevent changing the columns.
Please use Search before posting and read the Manual
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Hide "Manage Columns" from certain groups

Post by atrol »

KenTech wrote:I scoured the Mantis documentation but could not find any reference to even the variable for $g_add_profile_threshold variable.
Developers don't like writing documentations ;-)
The best way to get an impression of MantisBT's configuration options is to read config_defaults_inc.php
Please use Search before posting and read the Manual
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Re: Hide "Manage Columns" from certain groups

Post by KenTech »

atrol wrote:
KenTech wrote:Is there a variable for the manage columns threshold?
Still no ;-)
atrol wrote: There is is no option to prevent changing the columns.
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
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Hide "Manage Columns" from certain groups

Post by atrol »

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' ) ) ) {
Please use Search before posting and read the Manual
KenTech
Posts: 33
Joined: 20 Dec 2011, 18:27
Location: Burbank, CA
Contact:

Re: Hide "Manage Columns" from certain groups

Post by KenTech »

In file: core\html_api.php

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' ) );
	}
Append to: config.inc.php

Code: Select all

	$g_manage_columns_threshold = DEVELOPER;
So far it's working exactly how I wanted.
Post Reply