mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-10269: On deletion of role set name to null (#2444)
During deletion of role, set name to null. This fixes concurrent exception issue where previously it would rename the deleted role with a timestamp. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
123c20dc57
commit
0befb2cceb
|
|
@ -18,7 +18,6 @@ package org.apache.cloudstack.acl;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
|
@ -172,7 +171,7 @@ public class RoleManagerImpl extends ManagerBase implements RoleService, Configu
|
|||
}
|
||||
if (roleDao.remove(role.getId())) {
|
||||
RoleVO roleVO = roleDao.findByIdIncludingRemoved(role.getId());
|
||||
roleVO.setName(role.getName() + "-deleted-" + new Date());
|
||||
roleVO.setName(null);
|
||||
return roleDao.update(role.getId(), roleVO);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue