Unable to post comments in the past as sudo user session in API
Problem Statement
Admins cannot sudo users in such a way as to migrate historical conversations effectively within Gitlab using the current API. This leads to inaccurate dates of posting for comments and issues that are not visible until a user drills into the issue.
Context
In creating a migration script to tackle importing content from Bugzilla into Gitlab. I'm using the GitBeaker project as a harness for Gitlab calls, and I've hit a snag around importing user comments and issues. While I am able to post in the past as the admin user, I am unable to do so with an impersonated user session. The user in question is a guest user and is able to create the comments + issues, but does not have admin privileges.
I know that the sudo is working properly as I'm able to successfully post as other users, but I had expected to be able to perform more operations as the session is owned by an admin. Is there a way to grant more authority to sudo'd sessions, or to accomplish the desired migration without potentially breaking the repository?
Reach
Sidney: The migration of users to new Gitlab through the usage of API scripting is hampered by the inability to fully and accurately import historical data.
Devon: Imperfect migrations lead to the hesitance of users to migrate from legacy platforms that "just work" to newer modern platforms (in this case Gitlab).
Reach (self-managed): > 3.0
Impact
Better migration tooling through API support, improved management of users and data through API, and higher adoption rate through better support of historic content.
General (tentative) assessment: 1.0
While there is a workaround of posting the original posting date within the comment, this can be confusing to end-users and hinder searching by date of posting.
Confidence
Confidence: 80%
Attempted resolutions
The first thing I looked into doing was creating the comment and issue and changing the owner, but that doesn't look to be an option within the Issues API or the notes API. Once a note is created, its owning user cannot be changed. I also looked at modifying the timestamp afterward with an admin session, but that field isn't available either.
I looked to create a temporary migration group to limit the spillover of permissions into other projects while the migration is performed, but I can't add an external group at the owner privilege level on a project. Adding people to the base group/namespace of the project as owners isn't an ideal solution (due to the large amounts of projects that can exist under a namespace). This is compounded by the fact that we can't seem to lock down projects during a migration activity to mitigate some of the potential abuse of permissions.
The next thing I looked into was the potential of setting a new group as the parent of a project, but it appears that the transfer of projects to a namespace is potentially unsafe for the repository (from what is stated on the settings page of the admin panel for projects).
Effort
0.5m (Engineer, QA, Documentation combined efforts)