[Rt-commit] rt branch, 4.4/saved-search-links, updated. rt-4.4.4-91-g04abe15468
? sunnavy
sunnavy at bestpractical.com
Tue Oct 13 11:55:22 EDT 2020
The branch, 4.4/saved-search-links has been updated
via 04abe154682d1c87e79d85668d37fe021e45a9d0 (commit)
from f73e5c340cc10f11fb43ab3301fca72a48ac5750 (commit)
Summary of changes:
lib/RT/Attribute.pm | 11 +++++++++++
1 file changed, 11 insertions(+)
- Log -----------------------------------------------------------------
commit 04abe154682d1c87e79d85668d37fe021e45a9d0
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Oct 13 21:59:37 2020 +0800
Implement RT::Attribute::CurrentUserCanSee for transaction rights check
We added transaction records for dashboard/savedsearch changes in
9a44c12bd7, so RT::Transaction->Object could be an RT::Attribute. Since
RT::Transaction::CurrentUserCanSee deligates rights check to the
corresponding object(i.e. ->Object->CurrentUserCanSee), we need to
implement CurrentUserCanSee accordingly in RT::Attribute.
It's equal to CurrentUserHasRight('display').
diff --git a/lib/RT/Attribute.pm b/lib/RT/Attribute.pm
index 30c3dbc457..55dd684183 100644
--- a/lib/RT/Attribute.pm
+++ b/lib/RT/Attribute.pm
@@ -1185,6 +1185,17 @@ sub _SyncLinks {
return $success // 1;
}
+=head2 CurrentUserCanSee
+
+Shortcut of CurrentUserHasRight('display').
+
+=cut
+
+sub CurrentUserCanSee {
+ my $self = shift;
+ return $self->CurrentUserHasRight('display');
+}
+
RT::Base->_ImportOverlays();
1;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list