Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
best-practical
rt-extension-sla
Commits
d2ff490e
Commit
d2ff490e
authored
May 13, 2009
by
Ruslan Zakirov
Browse files
add protection by a right
parent
c837fc55
Changes
4
Hide whitespace changes
Inline
Side-by-side
META.yml
View file @
d2ff490e
...
...
@@ -8,7 +8,7 @@ build_requires:
configure_requires
:
ExtUtils::MakeMaker:
6.42
distribution_type
:
module
generated_by
:
'
Module::Install
version
0.8
5
'
generated_by
:
'
Module::Install
version
0.8
7
'
license
:
gpl2
meta-spec
:
url
:
http://module-build.sourceforge.net/META-spec-v1.4.html
...
...
html/Callbacks/RT-Extension-SLA/Tools/Reports/Elements/Tabs/Default
View file @
d2ff490e
...
...
@@ -2,6 +2,9 @@
$tabs => {}
</%ARGS>
<%INIT>
return unless $session{'CurrentUser'}->PrincipalObj->HasRight(
Object => $RT::System, Right => 'SeeSLAReports',
);
$tabs->{'s'} = {
title => loc('Service Level Aggreements'),
path => 'Tools/Reports/SLA.html',
...
...
html/Tools/Reports/SLA.html
View file @
d2ff490e
...
...
@@ -33,6 +33,14 @@
$Query => undef
</
%
ARGS>
<
%
INIT
>
unless (
$session{'CurrentUser'}->PrincipalObj->HasRight(
Object => $RT::System, Right => 'SeeSLAReports',
)
) {
Abort("You're not allowed to see SLA reports.");
}
my $title = loc("Report on Service Level Agreements");
use RT::Extension::SLA::Summary;
...
...
lib/RT/Extension/SLA.pm
View file @
d2ff490e
...
...
@@ -316,6 +316,14 @@ Just grant them ModifyCustomField right.
=cut
{
my
$right
=
'
SeeSLAReports
';
use
RT::
System
;
$
RT::System::
Rights
->
{
$right
}
=
'
See service level performance reports
';
use
RT::
ACE
;
$
RT::ACE::
LOWERCASERIGHTNAMES
{
lc
$right
}
=
$right
;
}
sub
BusinessHours
{
my
$self
=
shift
;
my
$name
=
shift
||
'
Default
';
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment