[Rt-commit] rt branch, 4.4/selfservice-show-more-user-info, repushed
Maureen Mirville
maureen at bestpractical.com
Wed Sep 12 13:27:16 EDT 2018
The branch 4.4/selfservice-show-more-user-info was deleted and repushed:
was 8d71732c8e0171ef20de05a0213d6b34716ef8c2
now 559629d766caf6e6c488a5512c7459e8b789d38d
1: 85b47645d = 1: 85b47645d Update article postfix loops from using $_ to a named variable
2: d9b5d635d = 2: d9b5d635d Remove Signature feature from SelfService Prefs
3: eb3a5e19a ! 3: 05937aa9d Allow self service users varied access to their stored RT user information
@@ -484,9 +484,9 @@
+ <tr>
+ <td class="label"><&|/l&>Language</&>:</td>
+% if ( $UserObj->Lang ) {
-+ <td class="value"><%$UserObj->Lang%></td>
++ <td class="value"><&|/l&><%$lang%></&></td>
+% } else {
-+ <td class="value"><&|/l&>en</&></td>
++ <td class="value"><&|/l&>English</&></td>
+% }
+ </tr>
+ <tr>
@@ -560,6 +560,11 @@
+ </td>
+ </tr>
+</table>
++
++<%INIT>
++use I18N::LangTags::List;
++my $lang = I18N::LangTags::List::name( $UserObj->Lang );
++</%INIT>
+
+<%ARGS>
+$UserObj
4: 2de48020f ! 4: 1613c3acb Update ModifySelf rights check for Preferences tab in SelfService
@@ -6,7 +6,7 @@
config, a new condition has also been added to this rights check.
Now if a user does not have the ModifySelf right, the Preferences
tab will stil display as long as the SelfServiceUserPrefs config
- is set to 'full-view'.
+ is set to 'view-info'.
diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
--- a/share/html/Elements/Tabs
5: ebc1edab3 = 5: 0bb0027e4 Add $SelfServiceUserPrefs config tests to verify SelfService display
6: fe3e75afd = 6: f5544a55b Add edit-prefs-view-info config option to $SelfServiceUserPrefs
7: e91924e23 = 7: 465397e2a Update $SelfServiceUserPrefs config tests to verify new display option
8: 8d71732c8 ! 8: 559629d76 Add config to allow SelfService users to request user info updates
@@ -1,6 +1,29 @@
Author: Maureen E. Mirville <maureen at bestpractical.com>
- Allow Self Service users to request updates to user's RT info
+ Add config to allow SelfService users to request user info updates
+
+diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
+--- a/etc/RT_Config.pm.in
++++ b/etc/RT_Config.pm.in
+@@
+
+ Set($SelfServiceUserPrefs, 'edit-prefs' );
+
++=item C<$SelfServiceRequestUpdatePortlet>
++
++Set this to 1 to allow Self Service users to request updates to
++their RT user information. When enabled, this portlet adds a quick
++ticket create portlet to the Self Service preferences page. This
++option is only available when $SelfServiceUserPrefs is set to
++'view-info' or 'edit-prefs-view-info'.
++
++=cut
++
++Set($SelfServiceRequestUpdatePortlet, 0 );
++
+ =back
+
+ =head2 Articles
diff --git a/share/html/SelfService/Elements/RequestUpdate b/share/html/SelfService/Elements/RequestUpdate
new file mode 100644
@@ -100,10 +123,20 @@
% }
% if ( $pref eq 'view-info' || $pref eq 'edit-prefs-view-info' ) {
<& /Prefs/Elements/ShowAboutMe, UserObj => $user &>
++% if ( $request_portlet ) {
+<& Elements/RequestUpdate, User=> $user &>
++% }
% }
<%INIT>
+@@
+ my $password = [ qw(CurrentPass NewPass1 NewPass2) ];
+
+ my $pref = RT->Config->Get( 'SelfServiceUserPrefs' ) || '';
++my $request_portlet = RT->Config->Get( 'SelfServiceRequestUpdatePortlet' ) || undef;
+
+ if ( $pref eq 'edit-prefs' || $pref eq 'full-edit' || $pref eq 'edit-prefs-view-info' ) {
+
@@
$session{'CurrentUser'} = $session{'CurrentUser'}; # force writeback
}
More information about the rt-commit
mailing list