commit | 436e9f3492479b5122c41daa61699ab05d38f242 | [log] [tgz] |
---|---|---|
author | Shawn <xiaoliang.tian@gmail.com> | Tue Aug 18 18:24:52 2020 +0800 |
committer | GitHub <noreply@github.com> | Tue Aug 18 18:24:52 2020 +0800 |
tree | 3e79e295ae1c667066cb27d9bb407fd74f2be628 | |
parent | 32bc378a2d37b711e81af2498a7725c10cd52ab3 [diff] |
do not read twice (#152)
diff --git a/server/resource/v1/common.go b/server/resource/v1/common.go index 06f52be..51ae38a 100644 --- a/server/resource/v1/common.go +++ b/server/resource/v1/common.go
@@ -57,7 +57,7 @@ func ReadClaims(ctx context.Context) map[string]interface{} { i := rbacframe.FromContext(ctx) if i != nil { - return rbacframe.FromContext(ctx).(map[string]interface{}) + return i.(map[string]interface{}) } return nil }