FlatImage
A configurable Linux containerization system
Loading...
Searching...
No Matches
ns_reserved::ns_permissions::Permissions Class Reference

Manages FlatImage permissions stored in reserved space. More...

#include <permissions.hpp>

Public Member Functions

 Permissions (fs::path const &path_file_binary)
 Constructs a Permissions manager for the given binary.
 
Value< void > set_all (bool value)
 Sets all permissions to the specified value.
 
Value< void > set (std::set< Permission > const &permissions)
 Sets the specified permissions (replaces existing)
 
Value< void > add (std::set< Permission > const &permissions)
 Adds permissions to existing configuration.
 
Value< void > del (std::set< Permission > const &permissions)
 Removes permissions from existing configuration.
 
bool contains (Permission const &permission) const noexcept
 Checks if a specific permission is enabled.
 
Value< std::set< std::string > > to_strings () const noexcept
 Converts enabled permissions to string representations.
 

Detailed Description

Manages FlatImage permissions stored in reserved space.

Definition at line 141 of file permissions.hpp.

Constructor & Destructor Documentation

◆ Permissions()

ns_reserved::ns_permissions::Permissions::Permissions ( fs::path const & path_file_binary)
inline

Constructs a Permissions manager for the given binary.

Parameters
path_file_binaryPath to the FlatImage binary file

Definition at line 169 of file permissions.hpp.

Member Function Documentation

◆ add()

Value< void > ns_reserved::ns_permissions::Permissions::add ( std::set< Permission > const & permissions)
inlinenodiscard

Adds permissions to existing configuration.

Parameters
permissionsSet of permissions to add
Returns
Value<void> Success or error

Definition at line 202 of file permissions.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ contains()

bool ns_reserved::ns_permissions::Permissions::contains ( Permission const & permission) const
inlinenodiscardnoexcept

Checks if a specific permission is enabled.

Parameters
permissionPermission to check
Returns
True if the permission is enabled, false otherwise

Definition at line 222 of file permissions.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ del()

Value< void > ns_reserved::ns_permissions::Permissions::del ( std::set< Permission > const & permissions)
inlinenodiscard

Removes permissions from existing configuration.

Parameters
permissionsSet of permissions to remove
Returns
Value<void> Success or error

Definition at line 212 of file permissions.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set()

Value< void > ns_reserved::ns_permissions::Permissions::set ( std::set< Permission > const & permissions)
inlinenodiscard

Sets the specified permissions (replaces existing)

Parameters
permissionsSet of permissions to enable
Returns
Value<void> Success or error

Definition at line 192 of file permissions.hpp.

Here is the caller graph for this function:

◆ set_all()

Value< void > ns_reserved::ns_permissions::Permissions::set_all ( bool value)
inlinenodiscard

Sets all permissions to the specified value.

Parameters
valueTrue to enable all permissions, false to disable
Returns
Value<void> Success or error

Definition at line 178 of file permissions.hpp.

Here is the caller graph for this function:

◆ to_strings()

Value< std::set< std::string > > ns_reserved::ns_permissions::Permissions::to_strings ( ) const
inlinenodiscardnoexcept

Converts enabled permissions to string representations.

Returns
Value containing a set of permission names

Definition at line 235 of file permissions.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: