Class Permission
Permission information for anything in Oqtane. Things in Oqtane are identified as Entities, so anything that can be identified can be described here.
public class Permission : ModelBase, IAuditable
- Inheritance
-
objectPermission
- Implements
- Inherited Members
Constructors
Permission()
public Permission()
Permission(int, string, int, string, string, int?, bool)
public Permission(int siteId, string entityName, int entityId, string permissionName, string roleName, int? userId, bool isAuthorized)
Parameters
siteId
intentityName
stringentityId
intpermissionName
stringroleName
stringuserId
int?isAuthorized
bool
Permission(int, string, string, string, int?, bool)
public Permission(int siteId, string entityName, string permissionName, string roleName, int? userId, bool isAuthorized)
Parameters
siteId
intentityName
stringpermissionName
stringroleName
stringuserId
int?isAuthorized
bool
Permission(string, int, bool)
public Permission(string permissionName, int userId, bool isAuthorized)
Parameters
permissionName
stringuserId
intisAuthorized
bool
Permission(string, string, bool)
public Permission(string permissionName, string roleName, bool isAuthorized)
Parameters
permissionName
stringroleName
stringisAuthorized
bool
Properties
EntityId
ID of the Entity these permissions apply to (ie. a ModuleId). A value of -1 indicates the permission applies to all EntityNames regardless of ID (ie. API permissions)
public int EntityId { get; set; }
Property Value
- int
EntityName
Name of the Entity these permissions apply to (ie. Module )
public string EntityName { get; set; }
Property Value
- string
IsAuthorized
The type of permission (ie. grant = true, deny = false)
public bool IsAuthorized { get; set; }
Property Value
- bool
PermissionId
Internal ID storing this information.
public int PermissionId { get; set; }
Property Value
- int
PermissionName
Name of the permission (ie. View)
public string PermissionName { get; set; }
Property Value
- string
Role
[Obsolete("The Role property is deprecated", false)]
[NotMapped]
[JsonIgnore]
public Role Role { get; set; }
Property Value
RoleId
public int? RoleId { get; set; }
Property Value
- int?
RoleName
The role name associated to the RoleId.
[NotMapped]
public string RoleName { get; set; }
Property Value
- string
SiteId
Reference to the Site which contains both the target Entity and permissions.
public int SiteId { get; set; }
Property Value
- int
UserId
public int? UserId { get; set; }
Property Value
- int?
Methods
Clone()
public Permission Clone()