@grails.compiler.GrailsCompileStatic static class Permission.Granted
权限鉴权的结果
可以当布尔类型在 if 判断中使用。
| Modifiers | Name | Description |
|---|---|---|
static Granted |
GRANTED |
|
static Granted |
GRANTED_ADMIN |
|
static Granted |
NOT_GRANTED |
|
static Granted |
NOT_GRANTED_PREFILTER |
|
boolean |
granted |
是否鉴权成功 |
Integer |
grantedLevel |
鉴权结果级别:通常鉴权失败为 0、成功则为非 0 整数 |
Set<Map> |
grantedRoles |
包含鉴权成功的角色列表 |
String |
rejectMessage |
鉴权失败的消息 |
static long |
serialVersionUID |
| Constructor and description |
|---|
Permission.Granted
() |
Permission.Granted
(Integer grantedLevel) |
Permission.Granted
(Set<Map> grantedRoles) |
Permission.Granted
(boolean granted) |
Permission.Granted
(boolean granted, String rejectMessage) |
是否鉴权成功
鉴权结果级别:通常鉴权失败为 0、成功则为非 0 整数
包含鉴权成功的角色列表
Map 对象中包括角色的 id、code、domainId、applicationId、organizationId 等信息。
鉴权失败的消息
BROPEN Documentation, 2020-04-21 11:00