Skip to content

Commit

Permalink
Add LAYMAN_GS_ROLE to all users
Browse files Browse the repository at this point in the history
  • Loading branch information
index-git committed Dec 15, 2023
1 parent eefb48b commit ab6ce48
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/layman/authz/role_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,13 @@ def ensure_admin_roles():
select %s, 'ADMIN'
UNION ALL
select %s, 'ADMIN'
union all
select w.name as username,
%s as rolename
from {settings.LAYMAN_PRIME_SCHEMA}.users u inner join
{settings.LAYMAN_PRIME_SCHEMA}.workspaces w on w.id = u.id_workspace
;"""
db_util.run_statement(create_admin_user_roles_view, (settings.LAYMAN_GS_USER, settings.LAYMAN_GS_ROLE, settings.LAYMAN_GS_USER, settings.GEOSERVER_ADMIN_USER, ))
db_util.run_statement(create_admin_user_roles_view, (settings.LAYMAN_GS_USER, settings.LAYMAN_GS_ROLE, settings.LAYMAN_GS_USER, settings.GEOSERVER_ADMIN_USER, settings.LAYMAN_GS_ROLE, ))


def get_user_roles(username):
Expand Down

0 comments on commit ab6ce48

Please sign in to comment.