Class UserPrincipal
Represents a simplic user principal
Inheritance
System.Object
UserPrincipal
Implements
System.Security.Principal.IPrincipal
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Simplic.Framework.Base
Assembly: Simplic.Framework.Base.dll
Syntax
public class UserPrincipal : IPrincipal
Constructors
| Improve this Doc View SourceUserPrincipal()
Initialize new principal
Declaration
public UserPrincipal()
UserPrincipal(UserIdentity)
Initialize new principal with given identities
Declaration
public UserPrincipal(UserIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
UserIdentity | identity |
Properties
| Improve this Doc View SourceGroups
Gets a list of user groups which are assigned to the current user
Declaration
public IList<GroupInfo> Groups { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<GroupInfo> |
Identity
Gets the user identity
Declaration
public IIdentity Identity { get; }
Property Value
Type | Description |
---|---|
System.Security.Principal.IIdentity |
Methods
| Improve this Doc View SourceIsInRole(String)
Check whether the user is in a specific role/group
Declaration
public bool IsInRole(string role)
Parameters
Type | Name | Description |
---|---|---|
System.String | role | Role name |
Returns
Type | Description |
---|---|
System.Boolean | True when the user in the role |
Implements
System.Security.Principal.IPrincipal