Class UserSecurity
- Namespace
- Oqtane.Security
- Assembly
- Oqtane.Shared.dll
public class UserSecurity
- Inheritance
-
object
UserSecurity
Methods
ContainsRole(List<Permission>, string, string)
public static bool ContainsRole(List<Permission> permissions, string permissionName, string roleName)
Parameters
permissions
List<Permission>
permissionName
string
roleName
string
Returns
- bool
ContainsUser(List<Permission>, string, int)
public static bool ContainsUser(List<Permission> permissions, string permissionName, int userId)
Parameters
permissions
List<Permission>
permissionName
string
userId
int
Returns
- bool
CreateClaimsIdentity(Alias, User)
public static ClaimsIdentity CreateClaimsIdentity(Alias alias, User user)
Parameters
alias
Alias
user
User
Returns
- ClaimsIdentity
CreateClaimsIdentity(Alias, User, List<UserRole>)
public static ClaimsIdentity CreateClaimsIdentity(Alias alias, User user, List<UserRole> userroles)
Parameters
alias
Alias
user
User
userroles
List<UserRole>
Returns
- ClaimsIdentity
IsAuthorized(User, List<Permission>)
public static bool IsAuthorized(User user, List<Permission> permissionList)
Parameters
user
User
permissionList
List<Permission>
Returns
- bool
IsAuthorized(User, string)
public static bool IsAuthorized(User user, string roles)
Parameters
user
User
roles
string
Returns
- bool
IsAuthorized(User, string, List<Permission>)
public static bool IsAuthorized(User user, string permissionName, List<Permission> permissionList)
Parameters
user
User
permissionName
string
permissionList
List<Permission>
Returns
- bool
IsAuthorized(User, string, string)
[Obsolete("IsAuthorized(User user, string permissionName, string permissions) is deprecated. Use IsAuthorized(User user, string permissionName, List<Permission> permissionList) instead", false)]
public static bool IsAuthorized(User user, string permissionName, string permissions)
Parameters
user
User
permissionName
string
permissions
string
Returns
- bool