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

Cannot save filter or dashboard if user is not part of group shared in filter/dashboard

    XMLWordPrintable

Details

    Description

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

      Summary

      If a user shares a filter or dashboard with a group or project role, that user must be a member of the group or role being shared.

      This check is also performed on existing entries on the share screen - therefore, if the user sharing the filter/dashboard is not a member of all roles and groups selected for sharing, the share will fail.

      In addition, for roles, the role name is obscured with "Unknown Role", making it hard for the user to correct the problem. 

      How to reproduce - Dashboard

      1. On a sample project where you are Project Admin, add your own user to the project role "Developers"
      2. Create a new dashboard, then visit ... in top right, and choose Share
      3. Share to the project, role -> Developers, and click Update.
      4. Remove the user from the role on that project
      5. Share the dashboard again:
        1. Note: the project role now says "Unknown Role"
        2. Try to add another role to share, say, Project Role -> Administrators, and click Update. It will fail with:
          You do not have permission to share with Project: 'SD' Role: [Unknown Role]. 

      How to reproduce - Filter

      1. On a sample project where you are Project Admin, add your own user to the project role "Developers"
      2. Save a new filter, then click Issues Menu -> Manage Filters
      3. Find your filter in the list, then click the Cog icon, then Edit
      4. Share to the project, role -> Developers, and click Save.
      5. Remove the user from the role on that project
      6. Share the Filter again:
        1. Note: the project role now says "Unknown Role"
        2. Try to add another role to share, say, Project Role -> Administrators, and click Update. It will fail with:
          You do not have permission to share with Project: 'SD' Role: [Unknown Role]. 

      Expected Results

      The user is still able to share the filter/dashboard

      Actual Results

      The share is unable to be saved, showing one of the following errors:

      You do not have permission to share with Group: 'example-group'.
      
      You do not have permission to share with Project: 'ExampleProject' Role: [Unknown Role].
      

      This appears in the browser’s JavaScript Console:

      batch.js?agile_global_admin_condition=true&atlassian.aui.raphael.disabled=true&is-system-admin=true…:3875 PUT https://instance.atlassian.net/rest/api/2/filter/10100?expand=subscriptions[-5:] 400 ()
      

      Analysing HAR files will give you this:

      Notes

      There’s a similar problem here:
      https://jira.atlassian.com/browse/JRA-59185

      Workaround

      Workaround 1

      Delete all share permissions on groups/roles that you are not a direct member of.

      1. Find the filter or dashboard, and enter the share screen:
        1. For Filters: Click Issues Menu -> Manage Filters. Under My Filters click the Filter, then click ‘cog icon’ >> ‘Edit’
        2. For Dashboards, Visit the dashboard, then choose [ ... ] -> Share Dashboard
      2. Click the 'trash can' icon next to each group or role that you are not a member of
        1. Roles needing to be removed will be displayed as "unknown role", however, groups will not show any indication.
      3. Click Update
        1. If an error is still shown, there are still additional group/role shares that will need to be 'trash can'ed

      Workaround 2

      Add the user back to the group/role. (this may cause changes in permission for this user, make sure to check this first).

      Attachments

        Issue Links

          Activity

            People

              nwroblewska Natalia Wroblewska
              jsilveira Jaime S
              Votes:
              74 Vote for this issue
              Watchers:
              67 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: