Return clear message if user can not move an issue to an epic
Related to #241219 (comment 422471778)
When an issue is moved between epic swimlanes and user can read target epic, but can not add issues to the target epic, then move operation fails. But we return resource not found
error which is really misleading, we should rather return clear error, something like "You don't have permission to assign issues to the epic".
The solution might be just catching ::Gitlab::Access::AccessDeniedError
in ~/gitlab-development-kit/gitlab/ee/app/services/ee/issues/base_service.rb#handle_epic:
def handle_epic(issue)
...
rescue ::Gitlab::Access::AccessDeniedError
raise EpicAssignmentError, "You don't have permission to assign issues to the epic"
end
Edited by Jan Provaznik