Merge branch 'adminLogin' into 'main'

add admin policy

See merge request v3/services/auth!15
This commit is contained in:
Sylvain Briat 2023-02-13 10:58:52 +00:00
commit 91a89cc65f
3 changed files with 9 additions and 0 deletions

7
opa/admin/login.rego Normal file
View File

@ -0,0 +1,7 @@
package ADMIN.LOGIN
default allow := false
allow {
input.role == "admin"
}

View File

@ -4,4 +4,5 @@ export enum Action {
UPDATE = 'UPDATE', UPDATE = 'UPDATE',
DELETE = 'DELETE', DELETE = 'DELETE',
LIST = 'LIST', LIST = 'LIST',
LOGIN = 'LOGIN',
} }

View File

@ -1,3 +1,4 @@
export enum Domain { export enum Domain {
USER = 'USER', USER = 'USER',
ADMIN = 'ADMIN',
} }