mirror of
https://github.com/ent/ent.git
synced 2026-05-22 09:31:45 +03:00
doc/privacy: add mutation filtering example to website
This commit is contained in:
committed by
Ariel Mashraki
parent
6ca96fff8b
commit
75df97bd24
@@ -102,7 +102,7 @@ func Do(ctx context.Context, client *ent.Client) error {
|
||||
fmt.Println(entgo)
|
||||
|
||||
// Expect operation to fail, because the FilterTenantRule rule makes sure
|
||||
// that tenants can update and delete their groups.
|
||||
// that tenants can update and delete only their groups.
|
||||
err = entgo.Update().SetName("fail.go").Exec(labView)
|
||||
if !ent.IsNotFound(err) {
|
||||
return fmt.Errorf("expect operation to fail, since the group (entgo) is managed by a different tenant (hub)")
|
||||
|
||||
Reference in New Issue
Block a user