[Bps-public-commit] rt-extension-repeatticket branch, check-right-on-modify, created. 1.11-1-g5667f78
? sunnavy
sunnavy at bestpractical.com
Wed Sep 30 14:16:54 EDT 2020
The branch, check-right-on-modify has been created
at 5667f780a72f7fb919042510c9070f1c650441fa (commit)
- Log -----------------------------------------------------------------
commit 5667f780a72f7fb919042510c9070f1c650441fa
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Oct 1 01:12:20 2020 +0800
Check ModifyTicket right before making changes
diff --git a/html/Ticket/ModifyRecurrence.html b/html/Ticket/ModifyRecurrence.html
index de8e100..0cad901 100644
--- a/html/Ticket/ModifyRecurrence.html
+++ b/html/Ticket/ModifyRecurrence.html
@@ -27,9 +27,14 @@ unless( $cf->id && ( $cf->can('IsAdded') ? ( $cf->IsAdded(0) || $cf->IsAdded($Ti
}
if ( $ARGS{SubmitTicket} ) {
- my ( $ret, $message ) = RT::Extension::RepeatTicket::SetRepeatAttribute( $TicketObj, %ARGS );
- $ARGSRef = \%ARGS if not $ret; # Save params on failure
- push @results, $message;
+ if ( $TicketObj->CurrentUserHasRight('ModifyTicket') ) {
+ my ( $ret, $message ) = RT::Extension::RepeatTicket::SetRepeatAttribute( $TicketObj, %ARGS );
+ $ARGSRef = \%ARGS if not $ret; # Save params on failure
+ push @results, $message;
+ }
+ else {
+ push @results, loc('Permission Denied');
+ }
}
</%INIT>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list