Skip to content

Commit d520b73

Browse files
committed
tmp rename
1 parent 9c76eab commit d520b73

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Seaography/docs/06-access-control/05-RBAC.md renamed to Seaography/docs/06-access-control/05-rbac.md.bak

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,19 @@ db.load_rbac().await?;
2020
let schema = query_root::schema(db, ..)?;
2121
```
2222

23+
In the GraphQL handler, you have to inject a `UserContext`:
24+
25+
```rust
26+
async fn graphql_handler(..) -> Result<..> {
27+
let mut req = req.into_inner();
28+
req = req.data(seaography::UserContext { user_id }); // ⬅ this user id is used in RBAC
29+
schema.execute(req).await.into()
30+
}
31+
```
32+
2333
## RBAC Editor
2434

25-
If you need a GUI editor to manage RBAC rules that tightly integrates with Seaography, then checkout [SeaORM Pro Plus](https://www.sea-ql.org/sea-orm-pro/docs/introduction/sea-orm-pro-plus/).
35+
If you need a GUI editor to manage RBAC rules that tightly integrates with Seaography, then checkout [SeaORM Pro Plus](https://www.sea-ql.org/preview/pr-154/sea-orm-pro/docs/rbac/role-permissions/).
2636

2737
RBAC-related features in SeaORM Pro Plus:
2838

0 commit comments

Comments
 (0)