You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ti...@apache.org on 2020/08/18 10:26:31 UTC

[servicecomb-kie] branch master updated: do not read twice (#152)

This is an automated email from the ASF dual-hosted git repository.

tianxiaoliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-kie.git


The following commit(s) were added to refs/heads/master by this push:
     new 436e9f3  do not read twice (#152)
436e9f3 is described below

commit 436e9f3492479b5122c41daa61699ab05d38f242
Author: Shawn <xi...@gmail.com>
AuthorDate: Tue Aug 18 18:24:52 2020 +0800

    do not read twice (#152)
---
 server/resource/v1/common.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 @@ var (
 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
 }