diff options
Diffstat (limited to 'rt/share/html/Admin/Users')
-rw-r--r-- | rt/share/html/Admin/Users/Memberships.html | 4 | ||||
-rwxr-xr-x | rt/share/html/Admin/Users/Modify.html | 52 | ||||
-rwxr-xr-x | rt/share/html/Admin/Users/index.html | 6 |
3 files changed, 21 insertions, 41 deletions
diff --git a/rt/share/html/Admin/Users/Memberships.html b/rt/share/html/Admin/Users/Memberships.html index ea5dd258b..cd8574d58 100644 --- a/rt/share/html/Admin/Users/Memberships.html +++ b/rt/share/html/Admin/Users/Memberships.html @@ -128,9 +128,7 @@ my $is_not_member = RT::Groups->new( $session{'CurrentUser'} ); $is_not_member->LimitToUserDefinedGroups; $is_not_member->WithoutMember( PrincipalId => $UserObj->Id ); -$Format ||= q{'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__id__</a>/TITLE:#'} - .q{,'<a href="__WebPath__/Admin/Groups/Modify.html?id=__id__">__Name__</a>/TITLE:Name'} - .q{,'__Description__'}; +$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'}; </%INIT> <%ARGS> $id => undef diff --git a/rt/share/html/Admin/Users/Modify.html b/rt/share/html/Admin/Users/Modify.html index aae38b173..6af7bf378 100755 --- a/rt/share/html/Admin/Users/Modify.html +++ b/rt/share/html/Admin/Users/Modify.html @@ -113,26 +113,11 @@ <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 /> - -% 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> -% } + +<& /Elements/EditPassword, + User => $UserObj, + Name => [qw(CurrentPass Pass1 Pass2)], +&> </&> % $m->callback( %ARGS, CallbackName => 'LeftColumnBottom', UserObj => $UserObj ); </td> @@ -364,22 +349,20 @@ if ($UserObj->Id && $id ne 'new') { # }}} } + +my %password_cond = $UserObj->CurrentUserRequireToSetPassword; if ( $UserObj->Id ) { - my $password_not_set; # Deal with Password field - 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; + 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 ($id eq 'new' and $password_not_set) { - push @results, loc("A password was not set, so user won't be able to login."); - } } @@ -431,7 +414,8 @@ $City => undef $State => undef $Zip => undef $Country => undef +$CurrentPass => undef $Pass1 => undef -$Pass2=> undef +$Pass2 => undef $Create=> undef </%ARGS> diff --git a/rt/share/html/Admin/Users/index.html b/rt/share/html/Admin/Users/index.html index e9a58183d..88a775fc3 100755 --- a/rt/share/html/Admin/Users/index.html +++ b/rt/share/html/Admin/Users/index.html @@ -93,7 +93,7 @@ <%INIT> my $caption; my $users = RT::Users->new( $session{'CurrentUser'} ); -$users->{'find_disabled_rows'} = 1 if $FindDisabledUsers; +$users->FindAllRows if $FindDisabledUsers; if ( defined($UserString) && length $UserString ) { $caption = loc("Users matching search criteria"); @@ -117,9 +117,7 @@ else { $users->LimitToPrivileged; } -$Format ||= q{'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__id__</a>/TITLE:#'} - .q{,'<a href="__WebPath__/Admin/Users/Modify.html?id=__id__">__Name__</a>/TITLE:Name'} - .q{,__RealName__, __EmailAddress__}; +$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Users'}; </%INIT> <%ARGS> |