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 ...