Retrieving permissions on issues from a database
JIRA is quite powerful in enforcing permissions on issues. There are quite a lot of configuration options in controlling who can do what. All these revolve around two different schemes in JIRA, Permission Scheme and Issue Security Scheme.
Permission Scheme enforces project-level security whereas Issue Security Scheme enforces issue-level security. It is possible for you to grant access to view issues in a project and yet hide some of those issues from the user. However, the reverse is not possible, that is, one cannot grant access to certain selected issues when the user originally didn't have access to view the issues in the project.
The various tables involved in storing permission information in the JIRA database, along with the relations between them, can be depicted as follows:
As you can see here, both the Permission Schemes and Issue Security Schemes are related to a project via the nodeassociation
table. Here, the SOURCE_NODE_ENTITY is...