API: Issues: Add author/changed_by fields
What does this MR do?
Adds new author (for issue creation) and changed_by (for issue changes) fields to the issue endpoints for Admin usage as an alternative to impersonation.
These have the notable difference that the author/changed_by can be even set to users that would normally lack the permissions to do the changes, making it very useful to migrating issues from other platforms using the API.
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because I first want some general feedback if such a change is desired before investing more work into it.
-
-
Documentation (if required) TBD. -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
Currently has no tests, TBD. Perfomance should not be affected as it only adds one more query for the author/change user, if the parameter for it is given.
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Marvin Scholz