deny app access if role_id is 3 (no access)
This commit is contained in:
parent
a7c0b0a626
commit
f6480d805b
1 changed files with 2 additions and 1 deletions
|
@ -262,7 +262,8 @@ def consent():
|
|||
.filter(AppRole.user_id == user.uuid)
|
||||
.first()
|
||||
)
|
||||
if role_object is None or role_object.role_id is None:
|
||||
# Role ID 3 is always "No access" due to migration b514cca2d47b
|
||||
if role_object is None or role_object.role_id is None or role_object.role_id == 3:
|
||||
# If there is no role in app_roles or the role_id for an app is null user has no permissions
|
||||
current_app.logger.error(f"User has no access for: {app_obj.name}")
|
||||
return redirect(
|
||||
|
|
Loading…
Reference in a new issue