CreateIssue restrict issue types

I’m developing a Jira Plugin which restricts certain issue types for certain groups. I am extending CreateIssue. I managed to validate against creating restricted Issue Types and show an error, but i would like to not even show the restricted Issue Types. I have overriden getIssueTypesForProject and return only permitted issue types but it is not working.

Can you share code snippets or how it’s not working etc? At least sharing your general approach would be good. Are you creating a new webaction or are you extending the jira rest plugin?

Im extending CreateIssue class and im overriding getIssueTypesForProject. My class gets callend and i can prevent creation of restricted IssueTypes in doValidation but i would like to hide the restricted IssueTypes also.

https://docs.atlassian.com/software/jira/docs/api/7.4.2/com/atlassian/jira/web/action/issue/CreateIssue.html

Ah… I think you’ll need to override CreateIssue (Atlassian JIRA 7.4.2 API)

However - remember that there a many other ways to add an Issue to a project. CreateIssue is just one way…