mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-04 15:47:32 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
19
roles/unmaintained/omv/files/auth_http.patch
Normal file
19
roles/unmaintained/omv/files/auth_http.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
--- /usr/share/php/openmediavault/session.inc.orig 2018-10-02 18:57:00.324000000 +0200
|
||||
+++ /usr/share/php/openmediavault/session.inc 2018-10-02 18:58:04.188000000 +0200
|
||||
@@ -91,8 +91,14 @@
|
||||
* @return Returns TRUE if the session is authenticated, otherwise FALSE.
|
||||
*/
|
||||
public function isAuthenticated() {
|
||||
- if (!isset($_SESSION['authenticated']) || !$_SESSION['authenticated'])
|
||||
- return FALSE;
|
||||
+ if (!isset($_SESSION['authenticated']) || !$_SESSION['authenticated']){
|
||||
+ if (isset($_SERVER['HTTP_AUTH_USER'])){
|
||||
+ $role = (isset($_SERVER['HTTP_OMV_ROLE']) && $_SERVER['HTTP_OMV_ROLE'] === 'admin') ? OMV_ROLE_ADMINISTRATOR : OMV_ROLE_USER;
|
||||
+ $this->initialize($_SERVER['HTTP_AUTH_USER'], $role);
|
||||
+ } else {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ }
|
||||
return TRUE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user