Skips removal of accessTokens when we update roleMembers
This commit is contained in:
@@ -722,9 +722,15 @@ func (svc role) MemberRemove(ctx context.Context, roleID, memberID uint64) (err
|
||||
return
|
||||
}
|
||||
|
||||
if err = svc.auth.RemoveAccessTokens(ctx, m); err != nil {
|
||||
return
|
||||
}
|
||||
// @todo skipping this for now,
|
||||
// AS per now PUT `/role/{roleID}` endpoint updates role and it's member with it but
|
||||
// only if one or more members are included in request otherwise we ignore it,
|
||||
// which causes issue in admin when we remove all the members from role.
|
||||
// we have to rework the role membership management logic in admin,
|
||||
// and use the dedicated endpoints for POST, DELETE role member.
|
||||
// if err = svc.auth.RemoveAccessTokens(ctx, m); err != nil {
|
||||
// return
|
||||
// }
|
||||
|
||||
_ = svc.eventbus.WaitFor(ctx, event.RoleMemberAfterRemove(m, r))
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user