1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-23 02:04:46 +02:00

[Web] fix idp mailbox login

This commit is contained in:
FreddleSpl0it 2024-02-05 17:11:36 +01:00 committed by DerLinkman
parent 058b79ed5c
commit 9a4b79a629
No known key found for this signature in database
GPG Key ID: F109FD97469550A2
2 changed files with 4 additions and 4 deletions

View File

@ -1027,10 +1027,10 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
} }
$template_attr = null; $template_attr = null;
if ($_data['template']){ if ($_data['template']){
$template_attr = mailbox('get', 'mailbox_templates', $_data['template'])['attributes']; $template_attr = mailbox('get', 'mailbox_templates', $_data['template'], $_extra)['attributes'];
} }
if (empty($template_attr)) { if (empty($template_attr)) {
$template_attr = mailbox('get', 'mailbox_templates')[0]['attributes']; $template_attr = mailbox('get', 'mailbox_templates', null, $_extra)[0]['attributes'];
} }
$MAILBOX_DEFAULT_ATTRIBUTES = array_merge($MAILBOX_DEFAULT_ATTRIBUTES, $template_attr); $MAILBOX_DEFAULT_ATTRIBUTES = array_merge($MAILBOX_DEFAULT_ATTRIBUTES, $template_attr);
@ -4711,7 +4711,7 @@ function mailbox($_action, $_type, $_data = null, $_extra = null) {
return $mailboxdata; return $mailboxdata;
break; break;
case 'mailbox_templates': case 'mailbox_templates':
if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin") { if ($_SESSION['mailcow_cc_role'] != "admin" && $_SESSION['mailcow_cc_role'] != "domainadmin" && !$_extra['iam_create_login']) {
return false; return false;
} }
$_data = (isset($_data)) ? intval($_data) : null; $_data = (isset($_data)) ? intval($_data) : null;

View File

@ -40,7 +40,7 @@
<input name="pass_user" type="password" id="pass_user" class="form-control" placeholder="{{ lang.login.password }}" required="" autocomplete="current-password"> <input name="pass_user" type="password" id="pass_user" class="form-control" placeholder="{{ lang.login.password }}" required="" autocomplete="current-password">
</div> </div>
</div> </div>
<div class="d-flex mt-4" style="position: relative"> <div class="d-flex justify-content-between mt-4" style="position: relative">
<div class="btn-group"> <div class="btn-group">
<button type="submit" class="btn btn-xs-lg btn-success" value="Login">{{ lang.login.login }}</button> <button type="submit" class="btn btn-xs-lg btn-success" value="Login">{{ lang.login.login }}</button>
<button type="button" class="btn btn-xs-lg btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> <button type="button" class="btn btn-xs-lg btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>