Hi everyone,
These forums have been very helpful already thanks, though I'm trying to take our database a bit further for simplicity.
Is there a way I can edit the My View page based on the user level? I understand how to make the changes I need but not how to stop them being global.
So for a Developer id like the My View page to only include:
- Assigned to Me
- Monitored by Me
Then for Updater id like the same My View to only show:
- New
- Resolved
- Recently Modified
- Monitored by Me
As I'm aware Id be making the change in config_inc as I have with everything else by using the following:
Developer:
$g_my_view_boxes = array (
'assigned' => '1',
'unassigned' => '0',
'reported' => '0',
'resolved' => '0',
'recent_mod' => '0',
'monitored' => '2',
'feedback' => '0',
'verify' => '0',
'my_comments' => '0'
);
Updater:
$g_my_view_boxes = array (
'assigned' => '0',
'unassigned' => '1',
'reported' => '0',
'resolved' => '2',
'recent_mod' => '3',
'monitored' => '4',
'feedback' => '0',
'verify' => '0',
'my_comments' => '0'
);
What Id like to know is what do I put prior to the code to ensure it only affects the people I want it to?
Many thanks
Editing My View based on user level
Moderators: Developer, Contributor
Re: Editing My View based on user level
There is no way to get this by just setting configuration options.
You can be set options globally (in config_inc..php), per project or per user (in database)
You have to write some lines of PHP code to set this option per user level.
You can be set options globally (in config_inc..php), per project or per user (in database)
You have to write some lines of PHP code to set this option per user level.
Re: Editing My View based on user level
Thanks, yeah I assumed there would need to be some code written. I am just hoping someone knows what it will be. I expect it to be along the lines of what I've done below, but I'm very new to this sort of thing.
if ( $g_access_levels_enum_string = 'developer') {
$g_my_view_boxes = array (
'assigned' => '1',
'unassigned' => '0',
'reported' => '0',
'resolved' => '0',
'recent_mod' => '0',
'monitored' => '2',
'feedback' => '0',
'verify' => '0',
'my_comments' => '0'
);
}
Anyone have any thoughts?
if ( $g_access_levels_enum_string = 'developer') {
$g_my_view_boxes = array (
'assigned' => '1',
'unassigned' => '0',
'reported' => '0',
'resolved' => '0',
'recent_mod' => '0',
'monitored' => '2',
'feedback' => '0',
'verify' => '0',
'my_comments' => '0'
);
}
Anyone have any thoughts?
Re: Editing My View based on user level
Didn't try, this should be the right way for it
Code: Select all
if ( access_get_project_level() == DEVELOPER )
Re: Editing My View based on user level
Thanks, but I'm afraid this didn't work.atrol wrote:Didn't try, this should be the right way for itCode: Select all
if ( access_get_project_level() == DEVELOPER )