+ {resolved.matched.length === 0 + ? 'No domain or group applies; this user gets Everyone\'s settings.' + : `Applies, in this order: Everyone, ${resolved.matched.map((id) => sourceLabel(id, draft.scopes)).join(', ')}.`} +
+ {rows.length === 0 ? ( +Everything is at Bulwark's defaults.
+ ) : ( +| Setting | +Value | +Set by | +
|---|---|---|
| {path} | +{formatValue(valueAt(resolved.policy as unknown as Record |
+ {sourceLabel(source, draft.scopes)} | +
+ Bulwark can only see groups that have a mailbox: a user counts as a member when the group's account is in their session. +
+None yet: every user gets Everyone's settings.
+ ) : ( ++ Selected for editing: {draft.scope.label} ({scopeMatchSummary(draft.scope)}). +
+ )} ++ Changes here apply to {scopeMatchSummary(draft.scope)} only. Settings this scope doesn't change come from Everyone. +
+ )} ++ {own ? Everyone: {everyone} : From Everyone: {everyone}} + {own && ( + + )} +
+ ); +} + +/** + * Lock, hide and allowed values of one restriction key, at the selected + * scope. Every user-facing option of the Organisation features is + * restricted through this, never through a flag of its own. + */ +export function RestrictionRow({ draft, def }: { draft: OrgPolicyDraft; def: RestrictionKeyDef }) { + const { value, own, everyone } = draft.restriction(def.key); + const current = value ?? {}; + const modes = def.modes ?? ['locked', 'hidden']; + const set = (patch: PartialNothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+Nothing to set here yet.
+