models.smb_permission module

class models.smb_permission.SmbPermission(access=None, mode=None, sid=None, special_access_mask=None, special_type=None, mtype=None)[source]

Bases: object

Implementation of the ‘SmbPermission’ model.

Specifies information about a single SMB permission.

Attributes:
access (AccessEnum): Specifies the read/write access to the SMB share.

‘kReadyOnly’ indicates read only access to the SMB share. ‘kReadWrite’ indicates read and write access to the SMB share. ‘kFullControl’ indicates full administrative control of the SMB share. ‘kSpecialAccess’ indicates custom permissions to the SMB share using access masks structures.

mode (ModeEnum): Specifies how the permission should be applied to

folders and/or files. ‘kFolderSubFoldersAndFiles’ indicates that permissions are applied to a Folder and it’s sub folders and files. ‘kFolderAndSubFolders’ indicates that permissions are applied to a Folder and it’s sub folders. ‘kFolderAndSubFiles’ indicates that permissions are applied to a Folder and it’s sub files. ‘kFolderOnly’ indicates that permsission are applied to folder only. ‘kSubFoldersAndFilesOnly’ indicates that permissions are applied to sub folders and files only. ‘kSubFoldersOnly’ indicates that permissiona are applied to sub folders only. ‘kFilesOnly’ indicates that permissions are applied to files only.

sid (string): Specifies the security identifier (SID) of the

principal.

special_access_mask (int): Specifies custom access permissions. When

the access mask from the Access Control Entry (ACE) cannot be mapped to one of the enums in ‘access’, this field is populated with the custom mask derived from the ACE and ‘access’ is set to kSpecialAccess. This is a placeholder for storing an unmapped access permission and should not be set when creating and editing a View.

special_type (int): Specifies a custom type. When the type from the

Access Control Entry (ACE) cannot be mapped to one of the enums in ‘type’, this field is populated with the custom type derived from the ACE and ‘type’ is set to kSpecialType. This is a placeholder for storing an unmapped type and should not be set when creating and editing a View.

mtype (TypeSmbPermissionEnum): Specifies the type of permission.

‘kAllow’ indicates access is allowed. ‘kDeny’ indicates access is denied. ‘kSpecialType’ indicates a type defined in the Access Control Entry (ACE) does not map to ‘kAllow’ or ‘kDeny’.

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.