JoaoJandre commented on code in PR #7242:
URL: https://github.com/apache/cloudstack/pull/7242#discussion_r1116188525


##########
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:
   I agree that disabling the button would be a better option, what do you 
think @soreana ?



-- 
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]

Reply via email to