* Sat Jan 11 2025 Brian Read <brianr@koozali.org> 11.0.0-38.sme

- Fix password reset for admin in user panel [SME: 12655]
This commit is contained in:
Brian Read 2025-01-11 07:04:32 +00:00
parent 174e140a04
commit 5ef3a00a05
2 changed files with 54 additions and 45 deletions

View File

@ -66,58 +66,65 @@
%my $password_text = l("PASSWORD_RESET");
%if ($useraccounts_user_name eq 'admin') {
%$actionModify = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
% <button type='button' class='sme-modify-button' title='$modify_text'>
% $modify_text
% </button>
% </a>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
% <button type='button' class='sme-modify-button' title='$modify_text'>
% $modify_text
% </button>
%</a>
%};
%$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name">
% <button type='button' class='sme-password-button' title='$password_text' >
% $password_text
% </button>
%</a>
%};
%} else {
%$actionModify = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
%</a>
%};
%}
%if ($password_set ne 'yes') {
%$actionLock = l('ACCOUNT_LOCKED');
%$actionResetPw = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
% $password_text
% </button>
% </a>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
% $password_text
% </button>
%</a>
%};
%} else {
%} elsif ($useraccounts_user_name ne 'admin') {
%my $lock_text = l('ACCOUNT LOCKED'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
%$actionLock = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
% <button type='button' class='sme-lock-button' title='$lock_text' >
% $lock_text
% </button>
% </a>
%};
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
% <button type='button' class='sme-lock-button' title='$lock_text' >
% $lock_text
% </button>
%</a>
%};
%$actionResetPw = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class='sme-password-button' title='$password_text' >
% $password_text
% </button>
% </a>
%</a>
%};
%}
%if ( $removable eq 'yes' ) {
%my $remove_text = l('REMOVE'); # Localized text
%my $csrf_token = "TOKEN"; # CSRF token for security
%$actionRemove = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
% </a>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
% <button type='button' class='sme-remove-button' title='$remove_text' >
% $remove_text
% </button>
%</a>
%};
%}
@ -127,20 +134,19 @@
%my $csrf_token = "TOKEN"; # CSRF token for security
%my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
%$actionroundcube = qq{
% <a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name">
% <button type='button' class='sme-email-button' title='$roundcube_text' >
% $roundcube_text
% </button>
% </a>
%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name">
% <button type='button' class='sme-email-button' title='$roundcube_text' >
% $roundcube_text
% </button>
%</a>
%};
<td class='sme-border' style="min-width:35em">
<%= $c->render_to_string(inline => $actionModify) %>
<%= $c->render_to_string(inline => $actionResetPw) %>
<%= $c->render_to_string(inline => $actionLock) %>
<%= $c->render_to_string(inline => $actionRemove) %>
<%= $c->render_to_string(inline => $actionroundcube) %>
</td>
<td class='sme-border' style="min-width:35em">
<%= $c->render_to_string(inline => $actionModify) %>
<%= $c->render_to_string(inline => $actionResetPw) %>
<%= $c->render_to_string(inline => $actionLock) %>
<%= $c->render_to_string(inline => $actionRemove) %>
<%= $c->render_to_string(inline => $actionroundcube) %>
</td>
</tr>
% }
</tbody>

View File

@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
%define name smeserver-manager
Name: %{name}
%define version 11.0.0
%define release 37
%define release 38
Version: %{version}
Release: %{release}%{?dist}
License: GPL
@ -115,8 +115,11 @@ true
%defattr(-,root,root)
%changelog
* Sat Jan 11 2025 Brian Read <brianr@koozali.org> 11.0.0-38.sme
- Fix password reset for admin in user panel [SME: 12655]
* Thu Jan 09 2025 Brian Read <brianr@koozali.org> 11.0.0-37.sme
- Delete userpanelaccess from base (left in incorrectly after saome testing) [SME: 12839]
- Delete userpanelaccess from base (left in incorrectly after some testing) [SME: 12839]
* Thu Jan 09 2025 Brian Read <brianr@koozali.org> 11.0.0-36.sme
- Fix spamassassin status not coming through from email filter panel to email settings panel [SME: 12868]