Gitlab::Git::PreReceiveError: You are not allowed to manage designs of this project
About
When moving an issue we copy the design collection. Copying the design collection involves adding commits to the design repository. It looks like some users have permission to move the issue (:admin_issue
on the target project), but not permission to push to the design repository of that project and are being denied by GitAccessDesign#check_can_create_design!
.
Proposal
We could use the Project#default_owner
to perform all of the git actions instead of the current_user
(git actions are performed here, here, here, here and here).
We will still record the correct Version#author
of the design in PostgreSQL (as we do now), and we would still check the user can :admin_issue
the target issue before performing the copy (admin_issue
is in-line with the permissions in Issue#can_move?
so we know users who kicked off an issue move will have that permission).
Sentry error
https://sentry.gitlab.net/gitlab/gitlabcom/issues/1891256/?referrer=gitlab_plugin
Gitlab::Git::PreReceiveError: You are not allowed to manage designs of this project
gitlab/gitaly_client/operation_service.rb:344:in `user_commit_files'
raise Gitlab::Git::PreReceiveError, pre_receive_error
gitlab/git/repository.rb:883:in `block in multi_action'
gitaly_operation_client.user_commit_files(user, branch_name,
gitlab/git/wraps_gitaly_errors.rb:7:in `wrapped_gitaly_errors'
yield block
gitlab/git/repository.rb:882:in `multi_action'
wrapped_gitaly_errors do
repository.rb:851:in `block in multi_action'
with_cache_hooks { raw.multi_action(user, **options) }
...
(92 additional frame(s) were not displayed)