Class WMUser
Class representing users as WMPrincipal instances to which access privileges can be granted, and
ownership of objects assigned.
Assembly: WMServer.dll
Syntax
[HasDTO(typeof(WMUserDTO))]
public class WMUser : WMPrincipal, IPolicyAssignable, IWMAssetOwner, IDbEntity, IWMEntity
Constructors
WMUser()
Default constructor that sets the ID to a new GUID.
Declaration
WMUser(string)
Constructor that initializes the ID.
Declaration
Parameters
Type |
Name |
Description |
string |
id |
|
Properties
Email
Declaration
public string Email { get; set; }
Property Value
Roles
List of roles assigned to the user in the system.
Declaration
public virtual ICollection<UserRole> Roles { get; set; }
Property Value
Methods
Get(string, AuthDbContext?)
Declaration
public static Task<WMUser> Get(string id, AuthDbContext? context = null)
Parameters
Returns
GetOrganizations(WMPrincipal, string, AuthDbContext)
Declaration
public static Task<IEnumerable<WMOrganization>> GetOrganizations(WMPrincipal principal, string userID, AuthDbContext context)
Parameters
Returns
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