()
| 481 | |
| 482 | #[test] |
| 483 | fn openshell_all_with_user_role() { |
| 484 | let id = identity_with_roles_and_scopes(&["openshell-user"], &["openshell:all"]); |
| 485 | let policy = scoped_policy(); |
| 486 | assert!( |
| 487 | policy |
| 488 | .check(&id, "/openshell.v1.OpenShell/ListSandboxes") |
| 489 | .is_ok() |
| 490 | ); |
| 491 | assert!( |
| 492 | policy |
| 493 | .check(&id, "/openshell.v1.OpenShell/GetProvider") |
| 494 | .is_ok() |
| 495 | ); |
| 496 | // admin methods still denied by role check |
| 497 | assert!( |
| 498 | policy |
| 499 | .check(&id, "/openshell.v1.OpenShell/CreateProvider") |
| 500 | .is_err() |
| 501 | ); |
| 502 | } |
| 503 | |
| 504 | #[test] |
| 505 | fn openshell_all_with_admin_role() { |
nothing calls this directly
no test coverage detected