Skip to content

Commit

Permalink
apply results from pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
petracihalova committed Dec 10, 2024
1 parent 007755c commit 07d1d90
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
28 changes: 14 additions & 14 deletions docs/source/specs/relations-openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ paths:
]
}
```
Schema in SpiceDB
```
definition user {}
definition group {
relation member: user | group#member
}
Expand Down Expand Up @@ -76,7 +76,7 @@ paths:
format: uuid
description: |
Example of request body from platform RBAC API
Request
```
POST /groups/0ff698d7-3972-4385-9a15-0fe9cd49f740/roles/
Expand All @@ -89,22 +89,22 @@ paths:
]
}
```
Schema in SpiceDB
```
definition rbac/v1role {
relation role: role
relation binding: role_binding
}
definition user {}
definition role {
}
definition group {
relation member: user | group#member
}
definition role_binding {
relation subject : user | group#member
}
Expand All @@ -113,23 +113,23 @@ paths:
Prerequisites:
```
role_binding:ROLE-UUID#granted@role:ROLE-UUID
rbac/v1role:ROLE-UUID#role@role:ROLE-UUID
// NOTE at this relation has to be checked before we add relation in example section
rbac/v1role:ROLE-UUID#binding@role_binding:ROLE-UUID
```
zed command to check:
```
role_binding:ROLE-UUID#subject@group:94846f2f-cced-474f-b7f3-47e2ec51dd1#member
```
Example of relations in SpiceDB to add a role to a group (in zed format)
```
role_binding:ROLE-UUID#subject@group:0ff698d7-3972-4385-9a15-0fe9cd49f740#member
```
[Authzed playground](https://play.authzed.com/s/NEIiBuig1-Bg/schema)
requestBody:
content:
Expand Down Expand Up @@ -171,14 +171,14 @@ paths:
]
}
```
Schema in SpiceDB
```
definition rbac/v1role {
relation role: role
relation binding: role_binding
}
definition user {}
definition role {
Expand Down
1 change: 0 additions & 1 deletion docs/source/specs/typespec/compile_tsp_spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@
#tsp install
tsp compile main.tsp
cp tsp-output/@typespec/openapi3/openapi.v2.yaml ../v2

2 changes: 1 addition & 1 deletion rbac/internal/specs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1993,4 +1993,4 @@
}
}
}
}
}

0 comments on commit 07d1d90

Please sign in to comment.