I want create user (role) that will be permitted to delete database with defined name. (for safe automation testing)
I can’t understand why my function not work (permission denied when i try “request as” from shell):
Lambda("ref", Equals(Select(["name"], Get(Var("ref"))), "test_database"))
The template of predicate function provides using data:
Lambda("ref", Equals(
Identity(), // logged in user
Select(["data", "owner"], Get(Var("ref")))
))
…but no data in:
Get(Database("name"))
it return:
{
ref: Database("somecompanyname_34f64628-a8f4-4e2d-969f-da45e8a04966"),
ts: 1648236978107000,
name: "somecompanyname_34f64628-a8f4-4e2d-969f-da45e8a04966",
global_id: "y1fdmb3qcyfr1"
}
There is some confusion here. Help me write a function please.