Skip to main content

Permission

Enum Permission 

Source
#[non_exhaustive]
pub enum Permission {
Show 37 variants ViewServices, ApproveServices, RejectServices, RemoveServices, UpdateServices, ViewSystemServices, ApproveSystemServices, RejectSystemServices, RemoveSystemServices, UpdateSystemServices, ViewSoftware, CreateSoftware, UpdateSoftware, DeleteSoftware, TriggerChecks, TriggerUpdates, ManageScheduler, ViewHosts, UpdateHosts, DeactivateHosts, ViewSettings, ManageAuthSettings, ManageEnrollmentTokens, ManageAgentCerts, ManageGlobalSettings, ManageCommands, ViewNotifications, ManageNotifications, ViewAuditLogs, ViewSystemAuditLogs, ManageUsers, ManageIgnores, TestPluginConfigs, AccessMcp, ViewInstanceConfigState, ManageInstanceConfigState, Other(String),
}
Expand description

An authorization permission.

Used in shared surface action descriptors (SurfaceActionDescriptor.permission) and web API auth middleware to gate access to actions and endpoints.

All variants serialize to / deserialize from snake_case strings. Unknown strings received on the wire are preserved as Permission::Other so that old binaries do not silently lose permissions added by newer builds.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ViewServices

View tenant services and their status.

§

ApproveServices

Approve pending service enrollments.

§

RejectServices

Reject pending service enrollments.

§

RemoveServices

Deactivate/remove services.

§

UpdateServices

Update service settings (ping interval, freeze, merge).

§

ViewSystemServices

View system services (MQTT bridge, external scheduler).

§

ApproveSystemServices

Approve pending system services.

§

RejectSystemServices

Reject pending system services.

§

RemoveSystemServices

Deactivate system services.

§

UpdateSystemServices

Update system service settings.

§

ViewSoftware

View software items, plugin configs, history.

§

CreateSoftware

Create software items and plugin configs.

§

UpdateSoftware

Edit software items and plugin configs.

§

DeleteSoftware

Delete software items and plugin configs.

§

TriggerChecks

Trigger version checks and autodiscovery.

§

TriggerUpdates

Trigger update execution (single + batch).

§

ManageScheduler

Manage scheduled tasks.

§

ViewHosts

View hosts.

§

UpdateHosts

Update host properties and tags.

§

DeactivateHosts

Deactivate hosts.

§

ViewSettings

View all tenant settings (unified read).

§

ManageAuthSettings

Manage registration, authentication, OIDC providers.

§

ManageEnrollmentTokens

Manage tenant enrollment tokens.

§

ManageAgentCerts

Manage agent certificate settings.

§

ManageGlobalSettings

Manage global infrastructure settings.

§

ManageCommands

Controls the ability to modify command-bearing plugin config fields (shell commands, Docker post_pull_command, and custom hook commands arrays). Granting this permission is equivalent to granting effective code-execution authority on all managed hosts assigned to the affected software items. Assign with the same care as granting root access.

§

ViewNotifications

View notification channels, rules, log.

§

ManageNotifications

Create/modify notification channels and rules; SMTP settings.

§

ViewAuditLogs

View tenant-scoped audit log entries.

§

ViewSystemAuditLogs

View system-level audit log entries.

§

ManageUsers

Manage user roles and access.

§

ManageIgnores

Manage autodiscovery ignore rules.

§

TestPluginConfigs

Test plugin configurations against hosts (dry-run validation).

§

AccessMcp

Access the MCP server endpoint (/mcp).

Gate to the MCP endpoint. Tools enforce their own additional fine-grained permission checks (ViewSoftware, TriggerUpdates).

§

ViewInstanceConfigState

View the current config-reload coordinator state.

§

ManageInstanceConfigState

Manage (clear-degraded) the config-reload coordinator state.

§

Other(String)

An unknown permission received from a newer build.

Preserved on the wire instead of being dropped, so old binaries never silently lose permissions added in newer builds.

Implementations§

Source§

impl Permission

Source

pub fn all() -> Vec<Permission>

Returns all permission variants.

Source

pub fn as_str(&self) -> &str

Returns the canonical snake_case string representation.

Source

pub fn description(&self) -> &str

Returns a human-readable description of the permission.

Trait Implementations§

Source§

impl Clone for Permission

Source§

fn clone(&self) -> Permission

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Permission

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Permission

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Permission, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Permission

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for Permission

Source§

impl From<String> for Permission

Source§

fn from(s: String) -> Permission

Converts to this type from the input type.
Source§

impl FromStr for Permission

Source§

type Err = Infallible

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Permission, <Permission as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Permission

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IntoEnumIterator for Permission

Source§

impl PartialEq for Permission

Source§

fn eq(&self, other: &Permission) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Permission

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Permission

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoLikeExpr for T
where T: Into<LikeExpr>,

Source§

impl<O> ObjectMarkerFor<Local> for O
where O: 'static,

Source§

impl<O> ObjectMarkerFor<SendSync> for O
where O: 'static + Send + Sync,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more