Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-13915

RPC DeleteUSer does not cleanup other user data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Medium
    • None
    • None
    • None
    • None

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      This is the code that rpc plugin executes:

              try
              {
                  final Map portalPageConfigurations = portalManager.getPortalPageConfigurations(user);
                  if (portalPageConfigurations != null)
                  {
                      for (Iterator iterator = portalPageConfigurations.values().iterator(); iterator.hasNext();)
                      {
                          PortalPageConfiguration ppc = (PortalPageConfiguration) iterator.next();
                          if (!ppc.isDefault())
                          {
                              portalManager.deletePortalPageConfiguration(user, ppc.getId());
                          }
                      }
                  }
              }
              catch (Exception e)
              {
                  throw new RemoteException("Unable to delete PortalConfiguration for user, cause: " + e.getMessage());
              }
              try
              {
                  UserUtils.removeUser(user);
              }
              catch (Exception e)
              {
                  throw new RemoteException("Unable to delete user, cause: " + e.getMessage(), e);
              }
      
      

      this is the DeleteUser action in JIRA:

              try
              {
                  if (confirm)
                  {
                      // The Validation happens in the request to perform the action
                      removeRoleActors();
                      if (!getHasErrorMessages())
                      {
                          final String username = user.getName();
      
                          permissionManager.removeUserPermissions(username);
                          removePortalConfigurationsForUser();
                          removeWatchesForUser();
                          removeVotesForUser();
      
                          // Remove the filters
                          searchRequestManager.removeAllFilters(user);
      
                          // Delete all the subscriptions for the user as well
                          subscriptionManager.deleteSubscriptionsForUser(user);
      
                          // Remove any notifications using this user
                          notificationSchemeManager.removeEntities(SingleUser.DESC, username);
      
                          // Remove the user from the component lead of all components lead
                          removeComponentLeadsForUser();
      
                          UserUtils.removeUser(user);
                      }
                  }
              }
              catch (Exception e)
              {
                  log.error("There was an error trying to remove user: " + user.getFullName(), e);
                  addErrorMessage(getText("admin.errors.users.exception.trying.to.remove", e));
              }
      

      Lets play spot the difference.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nick.menere Nick Menere [Atlassian] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: