pub enum Operation {
Find,
Count,
Get,
Create,
Update,
Delete,
AddField,
}Expand description
The seven operations a CLP can restrict.
addField is one of them, and it is checked on every non-master write that introduces a key
the schema does not have (DatabaseController.js:970-998).
Variants§
Implementations§
Source§impl Operation
impl Operation
pub const ALL: [Operation; 7]
Sourcepub fn as_key(self) -> &'static str
pub fn as_key(self) -> &'static str
The key as it appears in the CLP object, and in
Permission denied for action <op> on class <Class>.
Sourcepub fn user_fields_key(self) -> UserFieldsKey
pub fn user_fields_key(self) -> UserFieldsKey
Which of the two class-wide pointer-field arrays applies to this operation.
permissionField = ['get','find','count'].indexOf(operation) > -1 ? 'readUserFields' : 'writeUserFields' (SchemaController.js:1425-1429). Note addField falls on the write
side, which is what makes the create lockdown reachable.
pub fn from_key(key: &str) -> Option<Operation>
Trait Implementations§
impl Copy for Operation
impl Eq for Operation
impl StructuralPartialEq for Operation
Auto Trait Implementations§
impl Freeze for Operation
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnsafeUnpin for Operation
impl UnwindSafe for Operation
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Compare self to
key and return true if they are equal.