Interface IUser
Interface for a user.
public interface IUser : IHasKey
- Inherited Members
Properties
FirstName
Gets the users first name.
string FirstName { get; }
Property Value
Remarks
This is just an optional property and can be set.
Groups
Gets the groups the user belongs to.
KeyItemCollection<IGroup> Groups { get; }
Property Value
Icon
Gets a icon for the view.
Uri Icon { get; }
Property Value
Name
Gets the name of the user.
string Name { get; }
Property Value
Remarks
This is just an optional property and can be set.
Methods
CheckPassword(string)
Checks the password if it equals the users password.
bool CheckPassword(string password)
Parameters
password
stringThe password to check.
Returns
- bool
True, if it is the correct one.
HasPermission(IPermission)
Gets a value indicating that the user has the requested permission.
bool HasPermission(IPermission permission)
Parameters
permission
IPermissionThe requested permission.
Returns
- bool
A value indicating that the user has the requested permission.
SetPassword(string, IEnumerable<IStringRule>)
Sets the password.
bool SetPassword(string password, IEnumerable<IStringRule> rules)
Parameters
password
stringThe password to set.
rules
IEnumerable<IStringRule>The IStringRules for setting a password.
Returns
- bool
True, if setting was set successfully.