Skip to content
Snippets Groups Projects
Commit 9816bbf9 authored by Thomas Hackl's avatar Thomas Hackl
Browse files

note creation for non-admin users

parent dcef6aba
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,13 @@ class GitLab
return $note;
} catch (\Gitlab\Exception\RuntimeException $e) {
throw $e;
// If adding has failed because of SUDO (author does not have access to the project), create an issue without SUDO (as the Admin user whose token is configured)
if ($this->isAdmin) {
$note = $this->doCreateNote($projectId, $issueId, $data['markdown'], $authorId, false);
} else {
// If adding has failed for some other reason, propagate the exception back
throw $e;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment