Class WMOrganizationRoleDefinition
This definition is defined in the application before being converted into WMOrganizationRoleType in the DB.
Inherited Members
Namespace: Quantellia.WMServer.Auth.Model.UserAccess
Assembly: WMServer.dll
Syntax
public class WMOrganizationRoleDefinition
Properties
AdministratorRole
This role is assigned to administrators of an organization. Owners of this role are given rights over all protected resources by default.
Declaration
public static WMOrganizationRoleDefinition AdministratorRole { get; }
Property Value
Type | Description |
---|---|
WMOrganizationRoleDefinition |
ApplicationID
The description of this resource.
Declaration
public string ApplicationID { get; set; }
Property Value
Type | Description |
---|---|
string |
Documentation
Supporting documentation for this role type.
Declaration
public string Documentation { get; set; }
Property Value
Type | Description |
---|---|
string |
ManagerRole
This is the default role assigned to managers of an organization. Owners of this role are given rights over other organization users by default.
Declaration
public static WMOrganizationRoleDefinition ManagerRole { get; }
Property Value
Type | Description |
---|---|
WMOrganizationRoleDefinition |
MemberRole
This is the default role assigned to members of an organization. Owners of this role are given Get and Create permissions by default.
Declaration
public static WMOrganizationRoleDefinition MemberRole { get; }
Property Value
Type | Description |
---|---|
WMOrganizationRoleDefinition |
Priority
The priority this role has over other roles assigning the same permission.
Declaration
public int Priority { get; set; }
Property Value
Type | Description |
---|---|
int |
RoleTypeKey
The name of this resource expressed as a WMBaseResouceOperation.WMResource enum.
Declaration
public string RoleTypeKey { get; set; }
Property Value
Type | Description |
---|---|
string |
TerminatedRole
This role is assigned to terminated members of an organization. Owners of this role are denied rights over all resources by default.
Declaration
public static WMOrganizationRoleDefinition TerminatedRole { get; }
Property Value
Type | Description |
---|---|
WMOrganizationRoleDefinition |
Methods
GetOrCreateRole(string, AuthDbContext?, bool)
Finds an analogous role in the database, otherwise creates a new one.
Declaration
public Task<WMOrganizationRoleType> GetOrCreateRole(string organizationID, AuthDbContext? context = null, bool saveChanges = true)
Parameters
Type | Name | Description |
---|---|---|
string | organizationID | |
AuthDbContext | context | |
bool | saveChanges | If true, any created role will automatically be saved to the DB. |
Returns
Type | Description |
---|---|
Task<WMOrganizationRoleType> | The WMOrganizationRoleType as it appears in the DB. |