Class Role
Implements
Inherited Members
Namespace: LemonEdge.API.Entities.Administration
Assembly: LemonEdge.API.Entities.Auto.dll
Syntax
[DataContract]
public class Role : BaseEntityWithPermissions, IRole, IBaseEntityWithPermissions, IBaseEntity, IEquatable<IBaseEntity>, INotifyPropertyChanged, INotifyPropertyChanging, ICloneableAsync, ICanTrackProperties, ISetCopier, ICloneableAsync<IRole>, ISetCopierCloneAlterer
Constructors
Role()
Declaration
public Role()
Properties
CacheType
Indicates the default loading of the cache into the client. Can be configured for fast external access users such as those looking at dashboards from a browser
Declaration
[EnumDataType(typeof(CacheLoad))]
public CacheLoad CacheType { get; set; }
Property Value
| Type | Description |
|---|---|
| CacheLoad |
CacheType_Tooltip
Declaration
[NotMapped]
public string CacheType_Tooltip { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CopierCloneType
Declaration
public SetCopierCloneType CopierCloneType { get; set; }
Property Value
| Type | Description |
|---|---|
| SetCopierCloneType |
Description
A user friendly description of the purpose for this role
Declaration
[StringLength(2000)]
public string Description { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
IsSystem
Indicates this is one of the two system provided roles - Admin and Standard User.
Declaration
public bool IsSystem { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
[Key] A unique user friendly name for this role.
Declaration
[Unique]
[Required]
[StringLength(500)]
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
RoleHelpURL
If you have created a custom role with specific functionality, you can provide a help url to ensure users can get access to a help guide through how to use the role.
Declaration
[StringLength(2500)]
public string RoleHelpURL { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
AlterCopiedItem(IEntityUpdater, UserInfo, IReadOnlyCache, IBaseEntity)
A custom ability to alter this item when it is was copied by the user in the UI, not when it is being imported
Declaration
public Task AlterCopiedItem(IEntityUpdater host, UserInfo user, IReadOnlyCache cache, IBaseEntity sourceItem)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntityUpdater | host | The context this item was copied into |
| UserInfo | user | The current user |
| IReadOnlyCache | cache | The current local cache |
| IBaseEntity | sourceItem | The original source item this item was copied from |
Returns
| Type | Description |
|---|---|
| Task | A task inidicating the finishing of this method |
CopyFromEntity(IBaseEntity)
Declaration
protected override void CopyFromEntity(IBaseEntity src)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseEntity | src |
Overrides
CopyFromSource(IRole)
Updates all properties in this item to have the same properties as the source object.
Declaration
public void CopyFromSource(IRole source)
Parameters
| Type | Name | Description |
|---|---|---|
| IRole | source | The source object to copy all values from. |
CopyRelatedItem(IBaseEntity, EntityRelationship)
Determines whether the source item should be copied based on the provided relationship
Declaration
public bool CopyRelatedItem(IBaseEntity sourceItem, EntityRelationship rel)
Parameters
| Type | Name | Description |
|---|---|---|
| IBaseEntity | sourceItem | The original source item this item was copied from |
| EntityRelationship | rel | The particular relationship from the source item |
Returns
| Type | Description |
|---|---|
| bool |
ToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |