AuthZ: Deleting managed role permissions for a specified resource (#110617)
* basics for deleting managed role permissions for a specified resource * fix the query * fix query tests * storage tests * sql tests * add missing import * Update pkg/registry/apis/iam/resourcepermission/storage_backend.go Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> * PR feedback Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com> --------- Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
This commit is contained in:
Vendored
Executable
+8
@@ -0,0 +1,8 @@
|
||||
DELETE FROM `grafana`.`permission` as p
|
||||
WHERE p.scope = 'dash_123'
|
||||
AND p.role_id IN (
|
||||
SELECT r.id
|
||||
FROM `grafana`.`role` as r
|
||||
WHERE r.name LIKE 'managed:%'
|
||||
AND r.org_id = 3
|
||||
)
|
||||
Vendored
Executable
+8
@@ -0,0 +1,8 @@
|
||||
DELETE FROM "grafana"."permission" as p
|
||||
WHERE p.scope = 'dash_123'
|
||||
AND p.role_id IN (
|
||||
SELECT r.id
|
||||
FROM "grafana"."role" as r
|
||||
WHERE r.name LIKE 'managed:%'
|
||||
AND r.org_id = 3
|
||||
)
|
||||
Vendored
Executable
+8
@@ -0,0 +1,8 @@
|
||||
DELETE FROM "grafana"."permission" as p
|
||||
WHERE p.scope = 'dash_123'
|
||||
AND p.role_id IN (
|
||||
SELECT r.id
|
||||
FROM "grafana"."role" as r
|
||||
WHERE r.name LIKE 'managed:%'
|
||||
AND r.org_id = 3
|
||||
)
|
||||
Reference in New Issue
Block a user