Merge pull request #6439 from mailcow/fix/6430
[SOGo] Use JS for mailcow logout
This commit is contained in:
commit
153890b283
3 changed files with 14 additions and 9 deletions
|
@ -1,20 +1,15 @@
|
|||
59,65d58
|
||||
< ng-show="::!activeUser.isSuperUser"
|
||||
60,65d58
|
||||
< var:ng-click="navButtonClick"
|
||||
< ng-href="/user">
|
||||
< <md-icon>build</md-icon>
|
||||
< <md-tooltip><var:string label:value="mailcow"/></md-tooltip>
|
||||
< <md-tooltip>mailcow <var:string label:value="Preferences"/></md-tooltip>
|
||||
< </md-button>
|
||||
< <md-button class="md-icon-button"
|
||||
83c76
|
||||
< onclick="document.getElementById('mc_logout').setAttribute('action', '/'); document.getElementById('mc_logout').submit();"
|
||||
< onclick="mc_logout();"
|
||||
---
|
||||
> ng-show="::activeUser.path.logoff.length"
|
||||
85c78
|
||||
< ng-href="#">
|
||||
---
|
||||
> ng-href="{{::activeUser.path.logoff}}">
|
||||
89,91d81
|
||||
< <form method="POST" id="mc_logout" action="user">
|
||||
< <input type="hidden" name="logout" value="1">
|
||||
< </form>
|
||||
|
|
|
@ -5,6 +5,16 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||
window.location.href = '/user';
|
||||
}
|
||||
});
|
||||
// logout function
|
||||
function mc_logout() {
|
||||
fetch("/", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded"
|
||||
},
|
||||
body: "logout=1"
|
||||
}).then(() => window.location.href = '/');
|
||||
}
|
||||
|
||||
// Custom SOGo JS
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ services:
|
|||
- phpfpm
|
||||
|
||||
sogo-mailcow:
|
||||
image: ghcr.io/mailcow/sogo:1.131
|
||||
image: ghcr.io/mailcow/sogo:1.133
|
||||
environment:
|
||||
- DBNAME=${DBNAME}
|
||||
- DBUSER=${DBUSER}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue