Default View Status based on Role

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
badduck
Posts: 7
Joined: 30 Jan 2008, 09:46

Default View Status based on Role

Post by badduck »

Hi,

I would like to know how can I default the View Status upon creating new issues.
What I would like to achieve is
1. All reporters can only create and view public issues.
(I can already achieve this by defaulting to view status to public and deny change of view status)
2. All developers can only create private issues but view both private and public issues.
(Problem is the default is public view status when creating new issues. At best I would like to default it to private when creating new issues)
Is there a way to disallow developers from selecting public or default to private when creating new issues.

Regards,
Albert

PS; I am using 1.1.1
badduck
Posts: 7
Joined: 30 Jan 2008, 09:46

Re: Default View Status based on Role

Post by badduck »

I manage to force all users with developers and higher access to create private issues with the following hardcode in bug_report_page.php and bug_report_advanced_page.php.

Code: Select all

		# Forcing all developers and above to default to private view status
		$t_user 				= auth_get_current_user_id();
		$t_user_access_level 	= user_get_access_level( $t_user, $t_project_id );
		if( $t_user_access_level >= 50 ) {
			$f_view_state	= 50;
		}
		# Forcing all developers and above to default to private view status
Post Reply