sofie-identity 0.4.0

Accounts, their area memberships, and signing up, in and out: the identity an app opts into.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use sofie::prelude::*;

use super::Membership;
use crate::AccountId;

pub(crate) fn grant(account: AccountId, area: &str) -> Result<Membership> {
    Ok(Membership {
        meta: Meta::new()?,
        account,
        area: area.to_owned(),
        #[cfg(feature = "permissions")]
        role: None,
    })
}