[Rt-commit] rt branch, 4.4/role-lifecycle-right-check, repushed
Craig Kaiser
craig at bestpractical.com
Thu Aug 9 18:44:51 EDT 2018
The branch 4.4/role-lifecycle-right-check was deleted and repushed:
was f47a0f9189f547cfec82e755adc81324fa22209d
now eef8ba8fdc03fa96c61f568998b0a7b971f6ea5d
1: 6ed6267a0 = 1: 6ed6267a0 Test lifecycle rights check at context object level
2: f0ec1c1e9 ! 2: 212e0824e Add method for lifecycle rights check
@@ -28,8 +28,10 @@
+ my $self = shift;
+ my $context_obj = shift;
+
-+ return ( $self->__Value('Lifecycle') ) unless ! $context_obj || $context_obj->CatalogObj->Id ne $self->Id
-+ || ! ( $context_obj->CurrentUserHasRight('ShowCatalog') and $context_obj->CurrentUserHasRight('AdminCatalog') );
++ if ( $context_obj && $context_obj->CatalogObj->Id eq $self->Id &&
++ ( $context_obj->CurrentUserHasRight('ShowCatalog') or $context_obj->CurrentUserHasRight('AdminCatalog') ) ) {
++ return ( $self->__Value('Lifecycle') );
++ }
+
+ return ( $self->_Value('Lifecycle') );
+}
@@ -49,8 +51,9 @@
+ my $self = shift;
+ my $context_obj = shift;
-+ return ( $self->__Value('Lifecycle') ) unless ! $context_obj || ($context_obj->QueueObj->Id ne $self->Id)
-+ || ! $context_obj->CurrentUserHasRight('SeeQueue');
++ if ( $context_obj && $context_obj->QueueObj->Id eq $self->Id && $context_obj->CurrentUserHasRight('SeeQueue') ) {
++ return ( $self->__Value('Lifecycle') );
++ }
+
+ return ( $self->_Value('Lifecycle') );
+}
3: f47a0f918 = 3: eef8ba8fd Test lifecycle rights by passing context object
More information about the rt-commit
mailing list