[Bps-public-commit] rt-extension-formtools branch dynamic-forms-from-config updated. 0.53-101-gdefce7e
BPS Git Server
git at git.bestpractical.com
Mon Nov 13 14:14:54 UTC 2023
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-extension-formtools".
The branch, dynamic-forms-from-config has been updated
via defce7e7150c69539ca8b9245ca3bf49f098242f (commit)
from a0acc982528c2977ecdd311b78baa65fe3a82359 (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 defce7e7150c69539ca8b9245ca3bf49f098242f
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Nov 13 09:13:31 2023 -0500
Grant all users rights to see/set custom fields from forms
diff --git a/html/Forms/dhandler b/html/Forms/dhandler
index da768ba..64db5d6 100644
--- a/html/Forms/dhandler
+++ b/html/Forms/dhandler
@@ -132,6 +132,15 @@ else {
Abort('Form not found');
}
+no warnings 'redefine';
+my $orig_current_user_has_right = RT::CustomField->can('CurrentUserHasRight');
+local *RT::CustomField::CurrentUserHasRight = sub {
+ my $self = shift;
+ my $right = shift;
+ return 1 if $right =~ /SeeCustomField|SetInitialCustomField/;
+ return $orig_current_user_has_right->( $self, $right );
+};
+
my $page;
if ( $page_name ) {
-----------------------------------------------------------------------
Summary of changes:
html/Forms/dhandler | 9 +++++++++
1 file changed, 9 insertions(+)
hooks/post-receive
--
rt-extension-formtools
More information about the Bps-public-commit
mailing list