Class AccessLevel
A level of access granted to user for certain permission, i.e. if (level.Denied).....
Inheritance
System.Object
AccessLevel
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Azos.Security
Assembly: Azos.dll
Syntax
public sealed class AccessLevel
Constructors
AccessLevel(User, Permission, IConfigSectionNode)
Declaration
public AccessLevel(User user, Permission permission, IConfigSectionNode data)
Parameters
Type | Name | Description |
---|---|---|
User | user | |
Permission | permission | |
IConfigSectionNode | data |
Fields
CONFIG_LEVEL_ATTR
Declaration
public const string CONFIG_LEVEL_ATTR = "level"
Field Value
Type | Description |
---|---|
System.String |
DENIED
Access denied level: bearer has no access/zero
Declaration
public const int DENIED = 0
Field Value
Type | Description |
---|---|
System.Int32 |
DENIED_CONF
Declaration
public static readonly IConfigSectionNode DENIED_CONF
Field Value
Type | Description |
---|---|
IConfigSectionNode |
VIEW
View-only level: bearer has read-only access, so data can be viewed but can not be modified
Declaration
public const int VIEW = 1
Field Value
Type | Description |
---|---|
System.Int32 |
VIEW_CHANGE
Change level: bearer can view and change (add, edit) data but not delete it
Declaration
public const int VIEW_CHANGE = 2
Field Value
Type | Description |
---|---|
System.Int32 |
VIEW_CHANGE_DELETE
Full CRUD level: bearer can view, add, update, and delete data
Declaration
public const int VIEW_CHANGE_DELETE = 3
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
Data
Returns security data for this level
Declaration
public IConfigSectionNode Data { get; }
Property Value
Type | Description |
---|---|
IConfigSectionNode |
Denied
Indicates whether access is denied
Declaration
public bool Denied { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Level
Returns security level attribute from Data
Declaration
public int Level { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Permission
Returns permission that this access level is for
Declaration
public Permission Permission { get; }
Property Value
Type | Description |
---|---|
Permission |
User
Returns user that this access level is for
Declaration
public User User { get; }
Property Value
Type | Description |
---|---|
User |
Methods
DeniedFor(User, Permission)
Declaration
public static AccessLevel DeniedFor(User user, Permission permission)
Parameters
Type | Name | Description |
---|---|---|
User | user | |
Permission | permission |
Returns
Type | Description |
---|---|
AccessLevel |