Interface IUserPermissions
- Namespace
- Oqtane.Security
- Assembly
- Oqtane.Server.dll
public interface IUserPermissions
Methods
GetUser()
Returns
- User
GetUser(ClaimsPrincipal)
User GetUser(ClaimsPrincipal user)
Parameters
user
ClaimsPrincipal
Returns
- User
IsAuthorized(ClaimsPrincipal, int, string, int, string)
bool IsAuthorized(ClaimsPrincipal user, int siteId, string entityName, int entityId, string permissionName)
Parameters
user
ClaimsPrincipal
siteId
int
entityName
string
entityId
int
permissionName
string
Returns
- bool
IsAuthorized(ClaimsPrincipal, int, string, int, string, string)
bool IsAuthorized(ClaimsPrincipal user, int siteId, string entityName, int entityId, string permissionName, string roles)
Parameters
user
ClaimsPrincipal
siteId
int
entityName
string
entityId
int
permissionName
string
roles
string
Returns
- bool
IsAuthorized(ClaimsPrincipal, string, List<Permission>)
bool IsAuthorized(ClaimsPrincipal user, string permissionName, List<Permission> permissions)
Parameters
user
ClaimsPrincipal
permissionName
string
permissions
List<Permission>
Returns
- bool
IsAuthorized(ClaimsPrincipal, string, int, string)
[Obsolete("IsAuthorized(ClaimsPrincipal principal, string entityName, int entityId, string permissionName) is deprecated. Use IsAuthorized(ClaimsPrincipal principal, int siteId, string entityName, int entityId, string permissionName) instead.", false)]
bool IsAuthorized(ClaimsPrincipal user, string entityName, int entityId, string permissionName)
Parameters
user
ClaimsPrincipal
entityName
string
entityId
int
permissionName
string
Returns
- bool
IsAuthorized(ClaimsPrincipal, string, string)
bool IsAuthorized(ClaimsPrincipal user, string permissionName, string permissions)
Parameters
user
ClaimsPrincipal
permissionName
string
permissions
string
Returns
- bool