Update Site ID
This commit is contained in:
@@ -115,8 +115,10 @@ func (s *UserService) Update(ctx mycontext.Context, id int64, userReq *entity.Us
|
||||
return nil, errors.New("user not found")
|
||||
}
|
||||
|
||||
if *existingUser.PartnerID != *userReq.PartnerID {
|
||||
return nil, errors.New("user not found")
|
||||
if !ctx.IsAdmin() {
|
||||
if *existingUser.PartnerID != *userReq.PartnerID {
|
||||
return nil, errors.New("user partner cant be changed")
|
||||
}
|
||||
}
|
||||
|
||||
err = existingUser.ToUpdatedUser(*userReq)
|
||||
|
||||
Reference in New Issue
Block a user