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


##########
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:
   @harikrishna-patnala @JoaoJandre Yeah I totally agree, I didn't have time to 
fix it :D
   Now I've applied your suggestion.



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