You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "soreana (via GitHub)" <gi...@apache.org> on 2023/02/24 16:44:35 UTC

[GitHub] [cloudstack] soreana commented on a diff in pull request #7242: Don't allow users to remove their account or user.

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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org