test(workspace): preserve member-facing access without repositories
Apply T-717 item6/thread7 user decision: settings stay owner-controlled, ordinary non-owner viewing remains permitted under existing authentication. Add real HTTP assertions for non-owner workspace reads and absent management permissions; existing owner-only repository/deletion mutations and anonymous rejection remain exercised. Replace obsolete pending-policy documentation; no production authorization policy change. Validation: targeted repository-free HTTP test, root cargo check, yoi-workspace-server 639 lib + 11 bin tests, canonical OpenAPI freshness, cargo fmt and baseline/HEAD diff checks pass. Rust tests/documentation only; rendered UI and previously reviewed browser/visual evidence are unchanged.
This commit is contained in:
@@ -45115,6 +45115,23 @@ mod tests {
|
||||
StatusCode::OK,
|
||||
)
|
||||
.await;
|
||||
let non_owner_workspace = request_json_authenticated(
|
||||
app.clone(),
|
||||
"GET",
|
||||
&format!("{scoped}/workspace"),
|
||||
None,
|
||||
&foreign,
|
||||
StatusCode::OK,
|
||||
)
|
||||
.await;
|
||||
assert_eq!(
|
||||
non_owner_workspace["permissions"]["manage_repositories"],
|
||||
false
|
||||
);
|
||||
assert_eq!(
|
||||
non_owner_workspace["permissions"]["delete_workspace"],
|
||||
false
|
||||
);
|
||||
request_json(
|
||||
app.clone(),
|
||||
"GET",
|
||||
|
||||
Reference in New Issue
Block a user