Skip to content

Commit 0befb2c

Browse files
yadvrDaanHoogland
authored andcommitted
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>
1 parent 123c20d commit 0befb2c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

server/src/org/apache/cloudstack/acl/RoleManagerImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.util.ArrayList;
2020
import java.util.Collections;
21-
import java.util.Date;
2221
import java.util.List;
2322

2423
import javax.inject.Inject;
@@ -172,7 +171,7 @@ public Boolean doInTransaction(TransactionStatus status) {
172171
}
173172
if (roleDao.remove(role.getId())) {
174173
RoleVO roleVO = roleDao.findByIdIncludingRemoved(role.getId());
175-
roleVO.setName(role.getName() + "-deleted-" + new Date());
174+
roleVO.setName(null);
176175
return roleDao.update(role.getId(), roleVO);
177176
}
178177
return false;

0 commit comments

Comments
 (0)