RoleDto Class

Represents a Role that can be applied to users. Some roles are global, some are created and bound to a company.

Definition

Namespace: MobileTrack.Common.Models
Assembly: MobileTrack.Common (in MobileTrack.Common.dll) Version: 0.7+ce90b2cf6b782b8d7b7fd47b3c546987c652c00f
public sealed class RoleDto : ICloneable<RoleDto>, 
	IHasCompany, IHasImageReference, IIdLabel, IModifiedStats, ICreatedStats, 
	IHasVersion
Inheritance
Object    RoleDto
Implements
ICloneableRoleDto, ICreatedStats, IHasCompany, IHasImageReference, IHasVersion, IIdLabel, IModifiedStats

Constructors

RoleDto Constructor is only usable in the Common assembly; to instantiate new roles, use GenerateNewRole(AccountDto, CompanyDto, String) method.

Properties

CompanyId Represents the CompanyDto owning this object.
CreatedAt When this object was created.
CreatedBy The AccountDto user who created this business object.
HideForbiddenElements If users aren't allowed to interact with functions of the site because of a lack of permissions, should we hide them from view () or gray them out? (false)
I18NKey The localization key (only relevant for built-in roles)
Id The unique ID representing the object. Empty is not valid! This ID is used when other objects are referring to this object, and as the main ID in the Azure Cosmos database.
Image Image that can be associated to the Item
IsBuildIn Is it a build in role or owned by a company?
Label The label representing the object to the user. Empty or are not valid values for this property!
LastModifiedAt When this object was last modified
LastModifiedBy The AccountDto user that last modified this business object
Permissions Permissions associated with this role
SuperUser This makes the user a superuser, which means they have access to everything. This is a global role and should be used with caution; it should only be assigned to very few users.
VersionNumber Version number of the item. This number can only be increased, never decreased.

Methods

Clone Clones the current instance of the object.

Extension Methods

GenerateFourEyesRequestedMessage Generates a toast message for a four-eyes request, letting the user know it had been submitted properly.
(Defined by FourEyesExtensions)
GenerateToastMessageForAction Generates a toast message for the specified action.
(Defined by WebExtensions)
GenerateToastMessageForFourEyesCancelled Generates Toast message for when a four-eyes request has been denied
(Defined by WebExtensions)
GenerateToastMessageForItemCreation Generates Toast message for when an item has been successfully created.
(Defined by WebExtensions)
GenerateToastMessageForItemDeletion Generates Toast message for when an item has been successfully deleted.
(Defined by WebExtensions)
GenerateToastMessageForItemLicenseActivated Generates Toast message for when an item has been successfully activated.
(Defined by WebExtensions)
GenerateToastMessageForItemLicenseExpired Generates Toast message for when an item's license has been successfully expired.
(Defined by WebExtensions)
GenerateToastMessageForItemLock Generates Toast message for when an item has been successfully locked.
(Defined by WebExtensions)
GenerateToastMessageForItemRequestConfirmed Generates Toast message for when an item request has been successfully confirmed.
(Defined by WebExtensions)
GenerateToastMessageForItemRevertDelete Generates Toast message for when an item has been successfully reverted deletion.
(Defined by WebExtensions)
GenerateToastMessageForItemUnlock Generates Toast message for when an item has been successfully unlocked.
(Defined by WebExtensions)
GenerateToastMessageForItemUpdated Generates Toast message for when an item has been successfully updated.
(Defined by WebExtensions)
HasPermission Returns if the role contains any of the entered permission
(Defined by ModelGenericExtensions)
HasPermissionAll Returns if the role contains all the entered permissions
(Defined by ModelGenericExtensions)
IdString renders ID as a string for frontend brevity.
(Defined by ModelGenericExtensions)
IsIdAndLabelValid Checks whether the Id and Label have been properly entered.
(Defined by ModelValidatorsExtensions)
IsLabelValid Checks whether the Label field has a valid value; not , not whitespace (or beginning or ending with whitespace) and not only comprised of special characters.
(Defined by ModelValidatorsExtensions)
IsModifiedStatsValid Checks whether the model is properly filled in.
(Defined by ModelValidatorsExtensions)
IsRoleValid Checks whether the model is properly filled in.
(Defined by ModelValidatorsExtensions)
SetModifiedNow Change modified by stats to DateTime.UtcNow
(Defined by ModelGenericModifiers)
TrimLabel Trim the label of IIdLabel object.
(Defined by ModelGenericModifiers)

See Also