pub struct Acl { /* private fields */ }
Expand description
The default ACL, used by most of services. Can be overriden with a custom one
Implementations§
Source§impl Acl
impl Acl
pub fn id(&self) -> &str
pub fn get_items_allow_deny_reading(&self) -> (Vec<String>, Vec<String>)
pub fn check_admin(&self) -> bool
pub fn check_op(&self, op: Op) -> bool
pub fn check_item_read(&self, oid: &OID) -> bool
pub fn check_item_mask_read(&self, mask: &OIDMask) -> bool
pub fn check_item_write(&self, oid: &OID) -> bool
pub fn check_item_mask_write(&self, mask: &OIDMask) -> bool
pub fn check_pvt_read(&self, path: &str) -> bool
pub fn check_pvt_write(&self, path: &str) -> bool
pub fn check_rpvt_read(&self, path: &str) -> bool
pub fn require_admin(&self) -> EResult<()>
pub fn require_op(&self, op: Op) -> EResult<()>
pub fn require_item_read(&self, oid: &OID) -> EResult<()>
pub fn require_item_mask_read(&self, mask: &OIDMask) -> EResult<()>
pub fn require_item_write(&self, oid: &OID) -> EResult<()>
pub fn require_item_mask_write(&self, mask: &OIDMask) -> EResult<()>
pub fn require_pvt_read(&self, path: &str) -> EResult<()>
pub fn require_pvt_write(&self, path: &str) -> EResult<()>
pub fn require_rpvt_read(&self, path: &str) -> EResult<()>
pub fn contains_acl(&self, acl_id: &str) -> bool
pub fn meta(&self) -> Option<&Value>
pub fn from(&self) -> &[String]
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Acl
impl<'de> Deserialize<'de> for Acl
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Acl
impl RefUnwindSafe for Acl
impl Send for Acl
impl Sync for Acl
impl Unpin for Acl
impl UnwindSafe for Acl
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more