feat: load all user rights if token has no perms (empty state)
This commit is contained in:
parent
7f492d4a5e
commit
f54678fc2f
1 changed files with 5 additions and 0 deletions
|
|
@ -1403,6 +1403,11 @@ class User extends CommonObject
|
|||
$tokenobj = $this->db->fetch_object($resql);
|
||||
$this->db->free($resql);
|
||||
|
||||
if (empty($tokenobj->rights)) {
|
||||
$this->loadRights($moduletag, $forcereload);
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = "SELECT r.module, r.perms, r.subperms";
|
||||
$sql .= " FROM llx_rights_def as r";
|
||||
$sql .= " WHERE r.id IN (".$tokenobj->rights.")";
|
||||
|
|
|
|||
Loading…
Reference in a new issue