Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

It allows administrators to search for the groups where an a user belong to and the all the users in a group


Examples

Think about a query that must be executed by a specific group of users. You might want to create a special group named :"my-group"

Code Block
languagesql
themeEmacs
titleExample permissions
SELECT
    JQL.ISSUEID
FROM
  USERGOUPS g
JOIN
  JQL
WHERE
  g.GROUPNAME = 'my-group'
AND
  QUERY = '<some JQL here>'

The USERGOUPS table will return one record only if the current user belongs to 'my-group'. Otherwise, no record will be returned. This allows controlling the execution flow of the query. If the user does not belong to the group, the next tables will not be invoking and the query will not return any record.


Similarly,  it is possible to check if the current user has specific global permission or for a given project or issue and then "abort" the query by avoiding the execution of the next joined tables.