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, the Permission scheme and the Issue Security scheme.
The Permission scheme enforces project-level security, whereas the 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, SOURCE_NODE_ENTITY...