When a non-admin user attempts to perform a bulk delete of an object in Jira, a pop-up message is displayed. However, the same user has the ability to delete a single object or all objects of a particular type.

      Sorry, you do not have permission to perform this action. PermissionInsightException: User <> didn't have correct permission (view) for object: 31
      

      Steps to Reproduce

      1. Create a new Objectschema with a few objects.
      2. Login to Jira as a non-admin Schema manager user, and perform Bulk delete object
      3. Attached is the screen recording:  BulkDelete.mp4

      Expected Results

      User should be able to perform bulk delete objects.

      Actual Results

      The permission error popped up with the error message:

      Sorry, you do not have permission to perform this action. PermissionInsightException: User <> didn't have correct permission (view) for object: 31
      

      In the atlassian-jira.log, can see the below error:

      2024-01-17 11:06:37,038+0000 insight-InsightThreadGroup-worker-thread-2 ERROR Test     [c.r.j.p.i.services.core.ObjectServiceImpl] Error auditing object bulk deletion
      com.riadalabs.jira.plugins.insight.common.exception.PermissionInsightException: PermissionInsightException: User JIRAUSER10200 didn't have correct permission (admin).
      	at com.riadalabs.jira.plugins.insight.services.permission.DefaultInsightPermissionsChecker.checkPermission(DefaultInsightPermissionsChecker.java:98)
      	at com.riadalabs.jira.plugins.insight.services.permission.DefaultInsightPermissionsChecker.checkAdminPermission(DefaultInsightPermissionsChecker.java:281)
      	at com.riadalabs.jira.plugins.insight.services.progress.ProgressServiceBase.checkAdminPermission(ProgressServiceBase.java:596)
      	at com.riadalabs.jira.plugins.insight.services.progress.ProgressServiceBase.finishProgressOk(ProgressServiceBase.java:261)
      	at com.riadalabs.jira.plugins.insight.services.core.ObjectServiceImpl.runDeleteObjectsProcess(ObjectServiceImpl.java:1680)
      	at com.riadalabs.jira.plugins.insight.services.core.ObjectServiceImpl.lambda$deleteObjectsWithProgress$17(ObjectServiceImpl.java:1642)
      	at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      Workaround

      Grant Insight Administrator permission to the affected user to perform bulk delete.

      Note: This may not be desirable, as it will expose all schemas to the user

            [JSDSERVER-15040] Permission Error on Bulk delete Object

            Benjamin Suess made changes -
            Fix Version/s New: 5.12.6 [ 107322 ]
            Bartosz Ornatowski made changes -
            Fix Version/s New: 5.16.0 [ 107596 ]
            Timur Omelchenko made changes -
            Fix Version/s Original: 5.15.0 [ 107090 ]
            Fix Version/s New: 5.15.2 [ 108100 ]
            Satej Mirpagar made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Waiting for Release [ 12075 ] New: Closed [ 6 ]
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 3
            Thomas Bowes (Inactive) made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 877997 ]
            Benjamin Suess made changes -
            Status Original: In Progress [ 3 ] New: Waiting for Release [ 12075 ]
            Benjamin Suess made changes -
            Status Original: Short Term Backlog [ 12074 ] New: In Progress [ 3 ]
            Benjamin Suess made changes -
            Assignee New: Benjamin Suess [ c8bcca445054 ]
            Benjamin Suess made changes -
            Fix Version/s New: 5.15.0 [ 107090 ]

              c8bcca445054 Benjamin Suess
              nravi@atlassian.com Naveen Ravi
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: