casbinTrait RbacApi
Source pub trait RbacApi: MgmtApi {
Show 19 methods
// Required methods
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_user<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_role<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
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 Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_roles_for_user(
&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(
&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(
&self,
name: &str,
domain: Option<&str>,
) -> Vec<String>;
fn get_implicit_permissions_for_user(
&self,
name: &str,
domain: Option<&str>,
) -> Vec<Vec<String>>;
fn get_implicit_users_for_permission<'life0, 'async_trait>(
&'life0 self,
permission: Vec<String>,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn delete_permission<'life0, 'async_trait>(
&'life0 mut self,
permission: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
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 Self: Send + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}