Skip to content

Commit

Permalink
Merge pull request #28 from chilianyi/refactor
Browse files Browse the repository at this point in the history
Fix bind user role: unbind all the roles of the user
  • Loading branch information
chilianyi authored Feb 28, 2019
2 parents 11486b1 + 38b9581 commit c829d85
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/service/am/resource/user_role_binding_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ func BindUserRole(ctx context.Context, req *pb.BindUserRoleRequest) (*pb.BindUse

// Unbind first
if err := global.Global().Database.
Where(constants.ColumnRoleId+" in (?)", req.RoleId).
Where(constants.ColumnUserId+" in (?)", req.UserId).
Delete(models.UserRoleBinding{}).Error; err != nil {
return nil, gerr.NewWithDetail(ctx, gerr.Internal, err, gerr.ErrorInternalError)
Expand Down

0 comments on commit c829d85

Please sign in to comment.