404 on group issues/MR for shared project with issues/MR disabled
Summary
When a project with issues and/or merge requests disabled is shared with a group, the project is still able to be selected when creating an issue or merge request from the group, but this leads to a 404 error.
Steps to reproduce
- Create a project.
- Disable issues and/or merge requests in the project permissions.
- Create a group.
- Share the project with the group.
- Visit issues or merge requests from the group and try to create an issue or merge request by selecting the project.
What is the current bug behavior?
The project is listed as an option even though the issues or merge requests are disabled, so a 404 error is produced.
What is the expected correct behavior?
The project should not be listed as an option when the relevant permissions are disabled.