Commit e469eb14 authored by Chia-liang Kao's avatar Chia-liang Kao
Browse files

Make ShowGlobalTemplates a more limited right

parent 605565b9
......@@ -476,9 +476,13 @@ sub CurrentUserHasQueueRight {
sub CurrentUserCanRead {
my $self =shift;
return $self->QueueObj->Id
? $self->CurrentUserHasQueueRight('ShowTemplate')
: $self->CurrentUser->HasRight( Right =>'ShowGlobalTemplates', Object => $RT::System );
return 1 if $self->CurrentUserHasQueueRight('ShowTemplate');
return $self->CurrentUser->HasRight( Right =>'ShowGlobalTemplates', Object => $RT::System )
if !$self->QueueObj->Id;
return;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment