Compare commits

...

1 Commits

Author SHA1 Message Date
Clemens Schwaighofer
cfd49947ad Bug fix in ACL\Login: mnake sure ['base'] acl is int 2023-07-26 11:48:56 +09:00
3 changed files with 20 additions and 4 deletions

View File

@@ -85,6 +85,21 @@ function getScrollOffset()
}; };
} }
/**
* wrapper to get the correct scroll offset for opener page (from popup)
* @return {Object} object with x/y px
*/
function getScrollOffsetOpener() // eslint-disable-line no-unused-vars
{
var left, top;
left = opener.window.pageXOffset || (opener.document.documentElement.scrollLeft || opener.document.body.scrollLeft);
top = opener.window.pageYOffset || (opener.document.documentElement.scrollTop || opener.document.body.scrollTop);
return {
left: left,
top: top
};
}
/** /**
* centers div to current window size middle * centers div to current window size middle
* @param {String} id element to center * @param {String} id element to center

View File

@@ -1146,18 +1146,18 @@ class Login
// user > page > group // user > page > group
// group ACL 0 // group ACL 0
if ($_SESSION['GROUP_ACL_LEVEL'] != -1) { if ($_SESSION['GROUP_ACL_LEVEL'] != -1) {
$this->acl['base'] = $_SESSION['GROUP_ACL_LEVEL']; $this->acl['base'] = (int)$_SESSION['GROUP_ACL_LEVEL'];
} }
// page ACL 1 // page ACL 1
if ( if (
isset($_SESSION['PAGES_ACL_LEVEL'][$this->page_name]) && isset($_SESSION['PAGES_ACL_LEVEL'][$this->page_name]) &&
$_SESSION['PAGES_ACL_LEVEL'][$this->page_name] != -1 $_SESSION['PAGES_ACL_LEVEL'][$this->page_name] != -1
) { ) {
$this->acl['base'] = $_SESSION['PAGES_ACL_LEVEL'][$this->page_name]; $this->acl['base'] = (int)$_SESSION['PAGES_ACL_LEVEL'][$this->page_name];
} }
// user ACL 2 // user ACL 2
if ($_SESSION['USER_ACL_LEVEL'] != -1) { if ($_SESSION['USER_ACL_LEVEL'] != -1) {
$this->acl['base'] = $_SESSION['USER_ACL_LEVEL']; $this->acl['base'] = (int)$_SESSION['USER_ACL_LEVEL'];
} }
} }
$_SESSION['BASE_ACL_LEVEL'] = $this->acl['base']; $_SESSION['BASE_ACL_LEVEL'] = $this->acl['base'];

View File

@@ -2057,10 +2057,11 @@ class IO
/** /**
* this is only needed for Postgresql. Converts postgresql arrays to PHP * this is only needed for Postgresql. Converts postgresql arrays to PHP
* Recommended to rather user 'array_to_json' instead and convet JSON in PHP * Recommended to rather user 'array_to_json' instead and convet JSON in PHP
* or if ARRAY_AGG -> JSONB_AGG
* *
* @param string $text input text to parse to an array * @param string $text input text to parse to an array
* @return array<mixed> PHP array of the parsed data * @return array<mixed> PHP array of the parsed data
* @deprecated Recommended to use 'array_to_json' in PostgreSQL instead * @deprecated Recommended to use 'array_to_json/jsonb_agg' in PostgreSQL instead
*/ */
public function dbArrayParse(string $text): array public function dbArrayParse(string $text): array
{ {