[][src]Trait casbin::RbacApi

pub trait RbacApi {
#[must_use]    fn add_permission_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_permissions_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permissions: Vec<Vec<String>>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        role: &'life2 str,
        domain: Option<&'life3 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        roles: Vec<String>,
        domain: Option<&'life2 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        role: &'life2 str,
        domain: Option<&'life3 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        domain: Option<&'life2 str>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_role<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_permission<'life0, 'async_trait>(
        &'life0 mut self,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_permission_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str,
        permission: Vec<String>
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn delete_permissions_for_user<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        user: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn get_roles_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn get_users_for_role(
        &self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn has_role_for_user(
        &mut self,
        name: &str,
        role: &str,
        domain: Option<&str>
    ) -> bool;
fn get_permissions_for_user(
        &self,
        user: &str,
        domain: Option<&str>
    ) -> Vec<Vec<String>>;
fn has_permission_for_user(
        &self,
        user: &str,
        permission: Vec<String>
    ) -> bool;
fn get_implicit_roles_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<String>;
fn get_implicit_permissions_for_user(
        &mut self,
        name: &str,
        domain: Option<&str>
    ) -> Vec<Vec<String>>;
fn get_implicit_users_for_permission(
        &self,
        permission: Vec<String>
    ) -> Vec<String>; }

Required methods

#[must_use]fn add_permission_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn add_permissions_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permissions: Vec<Vec<String>>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn add_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    role: &'life2 str,
    domain: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn add_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    roles: Vec<String>,
    domain: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_role_for_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    role: &'life2 str,
    domain: Option<&'life3 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_roles_for_user<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    domain: Option<&'life2 str>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_role<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_permission<'life0, 'async_trait>(
    &'life0 mut self,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_permission_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str,
    permission: Vec<String>
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

#[must_use]fn delete_permissions_for_user<'life0, 'life1, 'async_trait>(
    &'life0 mut self,
    user: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

fn get_roles_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<String>

fn get_users_for_role(&self, name: &str, domain: Option<&str>) -> Vec<String>

fn has_role_for_user(
    &mut self,
    name: &str,
    role: &str,
    domain: Option<&str>
) -> bool

fn get_permissions_for_user(
    &self,
    user: &str,
    domain: Option<&str>
) -> Vec<Vec<String>>

fn has_permission_for_user(&self, user: &str, permission: Vec<String>) -> bool

fn get_implicit_roles_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<String>

fn get_implicit_permissions_for_user(
    &mut self,
    name: &str,
    domain: Option<&str>
) -> Vec<Vec<String>>

fn get_implicit_users_for_permission(
    &self,
    permission: Vec<String>
) -> Vec<String>

Loading content...

Implementors

impl RbacApi for CachedEnforcer[src]

impl RbacApi for Enforcer[src]

Loading content...