pub enum Audience {
Public,
Admin,
Link,
Subject,
}Expand description
Who an action is for. Drives the public/admin split of /__surface
and, in the renderer, which pages need the admin session.
Variants§
Public
Anyone; the action is the venture’s public face (join,
subscribe).
Admin
Needs Authorization: Bearer <ADMIN_TOKEN>; path must be under
/admin/.
Link
Reached only through a signed link the module minted (confirm,
unsubscribe, status); rendered as a landing page, never as a
form.
Subject
Needs a signed-in caller — any of them, unless the level refuses
everyone (issue #153, #385): on a deployment whose tenants come
from a registry, a tenant-members table answers 500 to every
caller, signed in or not.
The vocabulary had Public, Admin and Link and no word for
“somebody, and the route decides which rows they see”. A declared
table whose access is owner or tenant-members is exactly that,
and calling it Public would publish a form for rows the caller
cannot reach while calling it Admin would hide it from the
person whose rows they are.
It says a credential is needed and nothing more. Which rows the caller reaches is the table’s access level, decided per request against the caller’s own id; a surface cannot say that and should not pretend to.
Trait Implementations§
impl Copy for Audience
Source§impl<'de> Deserialize<'de> for Audience
impl<'de> Deserialize<'de> for Audience
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Audience
impl StructuralPartialEq for Audience
Auto Trait Implementations§
impl Freeze for Audience
impl RefUnwindSafe for Audience
impl Send for Audience
impl Sync for Audience
impl Unpin for Audience
impl UnsafeUnpin for Audience
impl UnwindSafe for Audience
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.