generated from VLADIMIR/template
fix
This commit is contained in:
@@ -203,9 +203,9 @@ func (s *server) DeleteUserRole(ctx context.Context, req *proto.DeleteUserRoleRe
|
||||
}
|
||||
|
||||
func (s *server) GetPermissions(ctx context.Context, _ *proto.GetPermissionsReq) (*proto.GetPermissionsRsp, error) {
|
||||
claims, claimsErr := claimsFromContext(ctx)
|
||||
if claimsErr != nil {
|
||||
return nil, claimsErr
|
||||
claims, _ := processor_jwt.ClaimsFromContext(ctx)
|
||||
if claims == nil {
|
||||
return &proto.GetPermissionsRsp{}, nil
|
||||
}
|
||||
permissions := s.uiService.GetPermissions(claims.Roles)
|
||||
return &proto.GetPermissionsRsp{
|
||||
|
||||
Reference in New Issue
Block a user