CloudStack
  1. CloudStack
  2. CLOUDSTACK-1941

Cannot delete users in the default admin account within the UI

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.2.0
    • Component/s: API, UI
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None

      Description

      Using 4.1, we cannot delete users in the default admin account. UI should allow to delete users other than the default admin user.

      If we create another admin account, we can delete them.

        Activity

        Hide
        Abhinandan Prateek added a comment - - edited

        Pranav,
        This is a UI bug as the delete button is not displayed. The account is though removable from the API.

        Show
        Abhinandan Prateek added a comment - - edited Pranav, This is a UI bug as the delete button is not displayed. The account is though removable from the API.
        Hide
        Pranav Saxena added a comment -

        I investigated this issue in detail . This is actually to do with a concept involved in deleting a user created by an admin . In the latest master also , all the users created by an admin are not supported for deletion . So the need is to know the conditions under which a user created by an admin can be deleted . Currently both admin user and a user created manually have “ROOT” domain , account type as 1 and account as Admin . And we don’t allow deletion of system generated user I,e the Admin user himself.

        I need to check out on the conditions here to resolve this issue and distinguish between the system generated Admin user and the Admin generated manual users .

        Show
        Pranav Saxena added a comment - I investigated this issue in detail . This is actually to do with a concept involved in deleting a user created by an admin . In the latest master also , all the users created by an admin are not supported for deletion . So the need is to know the conditions under which a user created by an admin can be deleted . Currently both admin user and a user created manually have “ROOT” domain , account type as 1 and account as Admin . And we don’t allow deletion of system generated user I,e the Admin user himself. I need to check out on the conditions here to resolve this issue and distinguish between the system generated Admin user and the Admin generated manual users .
        Hide
        Chip Childers added a comment -

        Setting fix version to 4.2 per my comment on the ML.

        Show
        Chip Childers added a comment - Setting fix version to 4.2 per my comment on the ML.
        Hide
        Pranav Saxena added a comment -

        Assigning it to Alena to fix the API and then I'll make the changes accordingly on the UI .

        Thanks !

        Show
        Pranav Saxena added a comment - Assigning it to Alena to fix the API and then I'll make the changes accordingly on the UI . Thanks !
        Hide
        Isaac Chiang added a comment -

        Hi:
        The deleteAccount and deleteUser commands can both delete default admin account(also associated users) and admin user respectively. Can these related issues be fixed in this ticket?

        Thanks

        Show
        Isaac Chiang added a comment - Hi: The deleteAccount and deleteUser commands can both delete default admin account(also associated users) and admin user respectively. Can these related issues be fixed in this ticket? Thanks
        Hide
        Pranav Saxena added a comment -

        That's right Isaac and that's why I started a discussion on the same on the dev ML . Hence, we plan to address both these API defects in the 4.2 time frame . If you see I have marked the components as API/UI for this ticket

        Show
        Pranav Saxena added a comment - That's right Isaac and that's why I started a discussion on the same on the dev ML . Hence, we plan to address both these API defects in the 4.2 time frame . If you see I have marked the components as API/UI for this ticket
        Hide
        Isaac Chiang added a comment -

        Get it, thanks
        I see some tickets remain unassigned, may I claim one or two of them ?

        Show
        Isaac Chiang added a comment - Get it, thanks I see some tickets remain unassigned, may I claim one or two of them ?
        Hide
        Pranav Saxena added a comment -

        Oh , yes . Please go ahead and update the status accordingly on whichever ones you are working on . Thanks !

        Show
        Pranav Saxena added a comment - Oh , yes . Please go ahead and update the status accordingly on whichever ones you are working on . Thanks !
        Hide
        ASF subversion and git services added a comment -

        Commit 9584815d4f35073214d7893704ff4bf6729a3155 in branch refs/heads/master from Alena Prokharchyk
        [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=9584815 ]

        CLOUDSTACK-1941: introduced "default" flag to account/user objects. Admin/System accounts that come with the CS install are default, and can never be removed. All accounts created by the CS admin, have default flag set to false, and can be removed at any time.

        Show
        ASF subversion and git services added a comment - Commit 9584815d4f35073214d7893704ff4bf6729a3155 in branch refs/heads/master from Alena Prokharchyk [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=9584815 ] CLOUDSTACK-1941 : introduced "default" flag to account/user objects. Admin/System accounts that come with the CS install are default, and can never be removed. All accounts created by the CS admin, have default flag set to false, and can be removed at any time.
        Hide
        ASF subversion and git services added a comment -

        Commit 11480c3af8b7d55625e791f955d7d077ea7f488e in branch refs/heads/master from Alena Prokharchyk
        [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=11480c3 ]

        CLOUDSTACK-1941: added isDefault parameter to account/user response

        Show
        ASF subversion and git services added a comment - Commit 11480c3af8b7d55625e791f955d7d077ea7f488e in branch refs/heads/master from Alena Prokharchyk [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=11480c3 ] CLOUDSTACK-1941 : added isDefault parameter to account/user response
        Hide
        Alena Prokharchyk added a comment -

        Reassigning the bug back to the UI team as the API/Java code is fixed. In the UI for the account/user objects with "isdefault"=true flag (returned with API) don't display Delete option.

        For QA to test:

        • as a part of the DB upgrade, make sure that the account/user table got additional field "default" (boolean). Only for system/admin account/user (id=1 and id=2) this flag should be set to 1. For all the rest it should be 0.
        • verify that system/admin account and user can't be removed with deleteUser/deleteAccount apis.
        • Add more users to the default "admin" account. Try to remove those added users = you should be able to do that.
        Show
        Alena Prokharchyk added a comment - Reassigning the bug back to the UI team as the API/Java code is fixed. In the UI for the account/user objects with "isdefault"=true flag (returned with API) don't display Delete option. For QA to test: as a part of the DB upgrade, make sure that the account/user table got additional field "default" (boolean). Only for system/admin account/user (id=1 and id=2) this flag should be set to 1. For all the rest it should be 0. verify that system/admin account and user can't be removed with deleteUser/deleteAccount apis. Add more users to the default "admin" account. Try to remove those added users = you should be able to do that.
        Hide
        ASF subversion and git services added a comment -

        Commit 11480c3af8b7d55625e791f955d7d077ea7f488e in branch refs/heads/internallb from Alena Prokharchyk
        [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=11480c3 ]

        CLOUDSTACK-1941: added isDefault parameter to account/user response

        Show
        ASF subversion and git services added a comment - Commit 11480c3af8b7d55625e791f955d7d077ea7f488e in branch refs/heads/internallb from Alena Prokharchyk [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=11480c3 ] CLOUDSTACK-1941 : added isDefault parameter to account/user response
        Hide
        ASF subversion and git services added a comment -

        Commit e309a91a9b2f439cf9c35b9dcbd79889f4a72504 in branch refs/heads/master from Pranav Saxena
        [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e309a91 ]

        CLOUDSTACK-1941:Cannot delete users in the default admin account within the UI

        Show
        ASF subversion and git services added a comment - Commit e309a91a9b2f439cf9c35b9dcbd79889f4a72504 in branch refs/heads/master from Pranav Saxena [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=e309a91 ] CLOUDSTACK-1941 :Cannot delete users in the default admin account within the UI
        Hide
        Sudha Ponnaganti added a comment -

        Testing the scenarios mentioned by Alena

        Show
        Sudha Ponnaganti added a comment - Testing the scenarios mentioned by Alena
        Hide
        Sudha Ponnaganti added a comment -

        Verified

        Show
        Sudha Ponnaganti added a comment - Verified

          People

          • Assignee:
            Pranav Saxena
            Reporter:
            Francois Gaudreault
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development