Uploaded image for project: 'Jira Server and Data Center'
  1. Jira Server and Data Center
  2. JRASERVER-25235

deleteUser leaves stray cwd_membership records

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Medium
    • Resolution: Duplicate
    • 4.3.3
    • None
    • None

    Description

      (See JCLI-178 for a report of this against JCLI).
      The JCLI action "removeUser":

      Given:

      • using jira internal directory (embedded Crowd, i.e. tables cwd_user, cwd_membership etc)
      • the appropriate constraints are satisfied (user is not reporter, assignee nor project lead)

      Result:

      • the user is removed from cwd_user
      • stray records remain in cwd_membership, check with this query:
        SELECT * FROM cwd_membership where not exists (select * from cwd_user where id=child_id)
      • If later the same user_name is created, it magically appears in the stray groups and cannot be removed from them
        • Jira and JCLI think the operation succeeds, but it has no effect
        • if jira-users is one of these groups, the user can login even before he's officially added to jira-users

      Analysis:

      • normally there are two relations cwd_user.id=cwd_membership.child_id and cwd_user.user_name=cwd_membership.child_name, but in this case only the latter holds. child_id is in effect a hanging FK without PK
      • given JRA-13915, guess it's possible that other stray records are left behind
      • IMHO this is also a CWD bug: no matter how called, it should uphold referential integrity

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              c024fb117e58 Vladimir Alexiev
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: