harikrishna-patnala commented on code in PR #7242:
URL: https://github.com/apache/cloudstack/pull/7242#discussion_r1109350123
##########
ui/src/config/section/account.js:
##########
@@ -196,6 +196,11 @@ export default {
message: 'message.delete.account',
dataView: true,
show: (record, store) => {
+ // Don't allow users to delete their account
+ if (record.id !== 'undefined' && store.userInfo.accountid ===
record.id) {
+ return false
+ }
+
return ['Admin', 'DomainAdmin'].includes(store.userInfo.roletype) &&
!record.isdefault &&
Review Comment:
May be disabling the action button makes it better, something like
disabled: (record, store) => { return (record.id !== 'undefined' &&
store.userInfo.accountid === record.id) },
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]