summaryrefslogtreecommitdiff
path: root/rt/share/html/Admin/Users/Modify.html
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Admin/Users/Modify.html')
-rwxr-xr-xrt/share/html/Admin/Users/Modify.html64
1 files changed, 46 insertions, 18 deletions
diff --git a/rt/share/html/Admin/Users/Modify.html b/rt/share/html/Admin/Users/Modify.html
index 6af7bf378..be67f35db 100755
--- a/rt/share/html/Admin/Users/Modify.html
+++ b/rt/share/html/Admin/Users/Modify.html
@@ -105,6 +105,12 @@
</table>
</&>
<br />
+
+<&| /Widgets/TitleBox, title => loc('Customers') &>
+<& /Elements/EditCustomers, Object => $UserObj, CustomerString=> $CustomerString, ServiceString => $ServiceString &>
+</&>
+<br />
+
<&| /Widgets/TitleBox, title => loc('Access control') &>
<input type="hidden" class="hidden" name="SetEnabled" value="1" />
<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> />
@@ -113,11 +119,26 @@
<input type="hidden" class="hidden" name="SetPrivileged" value="1" />
<input type="checkbox" class="checkbox" name="Privileged" value="1" <%$PrivilegedChecked||''%> /> <&|/l&>Let this user be granted rights</&><br />
-
-<& /Elements/EditPassword,
- User => $UserObj,
- Name => [qw(CurrentPass Pass1 Pass2)],
-&>
+
+% unless (RT->Config->Get('WebExternalAuth') and !RT->Config->Get('WebFallbackToInternalAuth')) {
+<table>
+<tr>
+<td align="right">
+<&|/l&>New Password</&>:
+</td>
+<td align="left">
+<input type="password" name="Pass1" autocomplete="off" />
+</td>
+</tr>
+<tr><td align="right">
+<&|/l&>Retype Password</&>:
+</td>
+<td>
+<input type="password" name="Pass2" autocomplete="off" />
+</td>
+</tr>
+</table>
+% }
</&>
% $m->callback( %ARGS, CallbackName => 'LeftColumnBottom', UserObj => $UserObj );
</td>
@@ -330,6 +351,8 @@ if ($UserObj->Id && $id ne 'new') {
push (@results,@fieldresults);
push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $UserObj );
+ #deal with freeside customer links
+ push @results, ProcessObjectCustomers( ARGSRef => \%ARGS, Object => $UserObj );
# {{{ Deal with special fields: Privileged, Enabled
if ( $SetPrivileged and $Privileged != $UserObj->Privileged ) {
@@ -349,20 +372,22 @@ if ($UserObj->Id && $id ne 'new') {
# }}}
}
-
-my %password_cond = $UserObj->CurrentUserRequireToSetPassword;
if ( $UserObj->Id ) {
+ my $password_not_set;
# Deal with Password field
- my ($status, $msg) = $UserObj->SafeSetPassword(
- Current => $CurrentPass,
- New => $Pass1,
- Confirmation => $Pass2,
- );
- push @results, $msg;
-
- if ( $id eq 'new' && !$status ) {
- push @results, loc("A password was not set, so user won't be able to login.");
+ if ( !$Pass1 and !$Pass2 ) {
+ $password_not_set = 1;
+ } elsif ( $Pass1 ne $Pass2 ) {
+ $password_not_set = 1;
+ push @results, loc("Passwords do not match.");
+ } elsif ( $Pass1 eq $Pass2 and !$UserObj->IsPassword($Pass1) ) {
+ my ($code, $msg) = $UserObj->SetPassword($Pass1);
+ push @results, loc_fuzzy($msg);
+ $password_not_set = 1 unless $code;
}
+ if ($id eq 'new' and $password_not_set) {
+ push @results, loc("A password was not set, so user won't be able to login.");
+ }
}
@@ -414,8 +439,11 @@ $City => undef
$State => undef
$Zip => undef
$Country => undef
-$CurrentPass => undef
$Pass1 => undef
-$Pass2 => undef
+$Pass2=> undef
$Create=> undef
+$OnlySearchForCustomers => undef
+$OnlySearchForServices => undef
+$CustomerString => undef
+$ServiceString => undef
</%ARGS>