Table of Contents

Interface IUser

Namespace
Loehnert.Lisrt.Users
Assembly
Loehnert.Lisrt.dll

Interface for a user.

public interface IUser : IHasKey
Inherited Members

Properties

FirstName

Gets the users first name.

string FirstName { get; }

Property Value

string

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

KeyItemCollection<IGroup>

Icon

Gets a icon for the view.

Uri Icon { get; }

Property Value

Uri

Name

Gets the name of the user.

string Name { get; }

Property Value

string

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 string

The 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 IPermission

The 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 string

The password to set.

rules IEnumerable<IStringRule>

The IStringRules for setting a password.

Returns

bool

True, if setting was set successfully.