Show / Hide Table of Contents

Class WMUser

Class representing users as WMPrincipal instances to which access privileges can be granted, and ownership of objects assigned.

Inheritance
object
WMPrincipal
WMUser
Implements
IPolicyAssignable
IWMAssetOwner
IDbEntity
IWMEntity
Inherited Members
WMPrincipal.ID
WMPrincipal.CreatedBy
WMPrincipal.CreatedDate
WMPrincipal.LastUpdatedBy
WMPrincipal.LastUpdatedDate
WMPrincipal.LoginName
WMPrincipal.Name
WMPrincipal.Password
WMPrincipal.Status
WMPrincipal.Get(string, string)
WMPrincipal.HashPassword(string, out string)
WMPrincipal.VerifyPassword(string, string, string)
WMPrincipal.Policies
WMPrincipal.Permissions
WMPrincipal.EnsureAuthorizedAsync<T>(WMAssetBaseDTO<T>)
WMPrincipal.EnsureAuthorizedAsync(WMAssetBase)
WMPrincipal.AuthorizedAsync(string, string)
WMPrincipal.Authorized(string, string)
WMPrincipal.AuthorizedAsync(string, string, string)
WMPrincipal.Authorized(string, string, string, string)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.Auth
Assembly: WMServer.dll
Syntax
[HasDTO(typeof(WMUserDTO))]
public class WMUser : WMPrincipal, IPolicyAssignable, IWMAssetOwner, IDbEntity, IWMEntity
Remarks

For additional properties not related to the security mode, see the UserProfile class.

Constructors

WMUser()

Default constructor that sets the ID to a new GUID.

Declaration
public WMUser()

WMUser(string)

Constructor that initializes the ID.

Declaration
public WMUser(string id)
Parameters
Type Name Description
string id

Properties

Email

Declaration
public string Email { get; set; }
Property Value
Type Description
string

Roles

List of roles assigned to the user in the system.

Declaration
public virtual ICollection<UserRole> Roles { get; set; }
Property Value
Type Description
ICollection<UserRole>

Methods

Get(string, AuthDbContext?)

Declaration
public static Task<WMUser> Get(string id, AuthDbContext? context = null)
Parameters
Type Name Description
string id
AuthDbContext context
Returns
Type Description
Task<WMUser>

GetOrganizations(WMPrincipal, string, AuthDbContext)

Declaration
public static Task<IEnumerable<WMOrganization>> GetOrganizations(WMPrincipal principal, string userID, AuthDbContext context)
Parameters
Type Name Description
WMPrincipal principal
string userID
AuthDbContext context
Returns
Type Description
Task<IEnumerable<WMOrganization>>

HasRole(string)

Tests if this user has been assigned the specified Roles.

Declaration
public bool HasRole(string roleName)
Parameters
Type Name Description
string roleName

The name of the role whose assignment to the user is being tested.

Returns
Type Description
bool

True if the user has been assigned the role, false otherwise.

Implements

IPolicyAssignable
IWMAssetOwner
IDbEntity
IWMEntity
In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 1/15/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE