Mailing List Archive

rt branch 5.0/asset-inline-edit updated. rt-5.0.5-77-g4bd57e420c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/asset-inline-edit has been updated
via 4bd57e420c1dedc0b6120af5240a18a6d04e84c4 (commit)
from b9145e73b665771e241db6f30724486303af8b24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4bd57e420c1dedc0b6120af5240a18a6d04e84c4
Author: sunnavy <sunnavy@bestpractical.com>
Date: Mon Dec 11 13:41:04 2023 -0500

Make sure inline edit is disabled for unprivileged users

Inline edit doesn't actually work for them anyway, because of the absent
helper component.

Previously we disabled it in /SelfService/Elements/MyRequests, which is
not enough any more as now we support various components for SelfService
especially via dashboards.

diff --git a/share/html/Elements/CollectionList b/share/html/Elements/CollectionList
index 273931177f..6aaa169cdc 100644
--- a/share/html/Elements/CollectionList
+++ b/share/html/Elements/CollectionList
@@ -125,7 +125,8 @@ foreach my $col (@Format) {

$Class ||= $Collection->ColumnMapClassName;

-$InlineEdit = 0 unless $Collection->isa('RT::Tickets') || $Collection->isa('RT::Assets');
+$InlineEdit = 0
+ unless $session{CurrentUser}->Privileged && ( $Collection->isa('RT::Tickets') || $Collection->isa('RT::Assets') );

$m->out('<div class="table-responsive">');
$m->out('<table cellspacing="0"');

-----------------------------------------------------------------------

Summary of changes:
share/html/Elements/CollectionList | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


hooks/post-receive
--
rt
_______________________________________________
rt-commit mailing list
rt-commit@lists.bestpractical.com
https://lists.bestpractical.com/mailman/listinfo/rt-commit