pub struct OrganizationConfig {
pub org_class_editors: String,
pub default_org_class: String,
}Expand description
The [organization] section: deployment-wide rules about the tenant itself.
Only one today, and it exists because organization.org_class is not an
ordinary column. A class decides what a @org_class= permission lets people
do, so an organisation that could rename its own class could grant itself
access — which is why the column is server-owned, and why saying who may
write it is a deployment decision rather than a row-level one.
Fields§
§org_class_editors: StringWho may set or change an organisation’s org_class, in the same
grammar as [permissions] — typically a class of its own, e.g.
"member@org_class=staff".
Defaults to "private": with no setting, no request can write the
column at all and classes are fixed by the operator (seed data, or SQL).
default_org_class: StringThe class stamped on an organisation created with none — every organisation the API makes, personal ones included.
Empty (the default) leaves new organisations unclassed, which no
@org_class= permission matches. Set it where a deployment’s ordinary
tenant is some kind — "customer" — so the permissions written for
that class apply from the moment an organisation exists, rather than
after somebody remembers to class it.
A class editor who names a class on create is not overridden: this fills the column in, it does not own it.
Implementations§
Source§impl OrganizationConfig
impl OrganizationConfig
Sourcepub fn org_class_policy(&self) -> Policy
pub fn org_class_policy(&self) -> Policy
The parsed policy for writing org_class. An unparseable setting is
private, like every other access string in the system.
Sourcepub fn default_class(&self) -> Option<&str>
pub fn default_class(&self) -> Option<&str>
The class new organisations start with, if the app names one.
Trait Implementations§
Source§impl Clone for OrganizationConfig
impl Clone for OrganizationConfig
Source§fn clone(&self) -> OrganizationConfig
fn clone(&self) -> OrganizationConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more