From d0a113315ad356675d05edfc92e62a3f810d51f5 Mon Sep 17 00:00:00 2001 From: sbriat Date: Mon, 30 Jan 2023 15:51:24 +0100 Subject: [PATCH] fix opa rules --- opa/user/delete.rego | 10 +++++----- opa/user/list.rego | 6 +++--- opa/user/read.rego | 2 +- opa/user/update.rego | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/opa/user/delete.rego b/opa/user/delete.rego index ec31a55..541466e 100644 --- a/opa/user/delete.rego +++ b/opa/user/delete.rego @@ -1,11 +1,11 @@ -package user.delete +package USER.DELETE default allow := false -allow := true { - input.uuid == input.owner +allow { + input.uuid == input.owner } -allow := true { - input.role == "admin" +allow { + input.role == "admin" } diff --git a/opa/user/list.rego b/opa/user/list.rego index 4d92535..6774831 100644 --- a/opa/user/list.rego +++ b/opa/user/list.rego @@ -1,7 +1,7 @@ -package user.list +package USER.LIST default allow := false -allow := true { - input.role == "admin" +allow { + input.role == "admin" } diff --git a/opa/user/read.rego b/opa/user/read.rego index 16132e4..5650aae 100644 --- a/opa/user/read.rego +++ b/opa/user/read.rego @@ -1,4 +1,4 @@ -package user.read +package USER.READ default allow := false diff --git a/opa/user/update.rego b/opa/user/update.rego index 54d80a0..6cde81b 100644 --- a/opa/user/update.rego +++ b/opa/user/update.rego @@ -1,11 +1,11 @@ -package user.update +package USER.UPDATE default allow := false -allow := true { - input.uuid == input.owner +allow { + input.uuid == input.owner } -allow := true { - input.role == "admin" +allow { + input.role == "admin" }