Commit 27d0fca
committed
Read workspace settings for a teamless scope, not a permissive constant
Isaiah's ruling for this stack is that falling back to workspace settings
when the scope has no team is the intended behaviour. A hardcoded
`UNRESTRICTED` was not that: on a sharing control it was potentially more
permissive than the workspace's own policy. Drop the `has_teams()` guard
so a teamless scope reads `current_workspace().settings` directly, and
delete the constant, returning `workspace.rs` to master.
The no-workspace arm stays permissive, preserving the `unwrap_or(true)`
these getters had before they took a scope; there is no workspace policy
to read there, and denying would newly hide the share UI while workspaces
load.1 parent c9e1c43 commit 27d0fca
3 files changed
Lines changed: 24 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1951 | 1951 | | |
1952 | 1952 | | |
1953 | 1953 | | |
1954 | | - | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
1955 | 1957 | | |
1956 | | - | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
| 1958 | + | |
| 1959 | + | |
1960 | 1960 | | |
1961 | 1961 | | |
1962 | 1962 | | |
| |||
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
1971 | | - | |
1972 | | - | |
1973 | | - | |
1974 | | - | |
1975 | | - | |
1976 | | - | |
1977 | | - | |
1978 | | - | |
1979 | 1971 | | |
1980 | 1972 | | |
1981 | | - | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
1982 | 1977 | | |
1983 | 1978 | | |
1984 | 1979 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
1360 | 1366 | | |
1361 | 1367 | | |
1362 | 1368 | | |
| |||
1376 | 1382 | | |
1377 | 1383 | | |
1378 | 1384 | | |
1379 | | - | |
1380 | | - | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
1381 | 1390 | | |
1382 | | - | |
1383 | 1391 | | |
1384 | 1392 | | |
1385 | 1393 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
977 | 977 | | |
978 | 978 | | |
979 | 979 | | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | 980 | | |
990 | 981 | | |
991 | 982 | | |
| |||
0 commit comments