mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-07 23:03:00 +03:00
Added and addressed multi-role/own-role-perm/inheretance scenario
Found during manual testing. Have checked against relation queries manually too.
This commit is contained in:
@@ -99,7 +99,7 @@ class PermissionApplicator
|
||||
->selectRaw('max(status) as status')
|
||||
->whereIn('role_id', $this->getCurrentUserRoleIds())
|
||||
->groupBy(['entity_type', 'entity_id'])
|
||||
->havingRaw('(status IN (1, 3) or owner_id = ?)', [$this->currentUser()->id]);
|
||||
->havingRaw('(status IN (1, 3) or (owner_id = ? and status != 2))', [$this->currentUser()->id]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user