Commit author restriction
Description
It is possible to push changes to a repository that can include commits from someone else. In highly controlled environments, this may be undesirable.
Proposal
- A hook or control which enforces that only the author of a commit can push those changes back to the repository.
Design
Add an option to Push Rules both in the Admin Panel and with Project settings:
Admin | Project |
---|---|
![]() |
![]() |
If the setting is applied within the admin panel, a non-admin will see the following on a project:
[input checked, disabled] **Author restriction**
Only the author of a commit can push changes to this repository. This setting is applied on the server level. Contact an admin to change this setting.
If the setting is applied within the admin panel, an admin will see the following on a project:
[input checked, enabled] **Author restriction**
Only the author of a commit can push changes to this repository. This setting is applied on the server level and can be overridden by an admin.
If the setting is applied within the admin panel, and an admin has overrode the setting on a project, the admin will see:
[input not-checked, enabled] **Author restriction**
Only the author of a commit can push changes to this repository. This setting is applied on the server level but has been overridden for this project.
If the setting is applied within the admin panel, and a non-admin has overrode the setting on a project, the admin will see:
[input not-checked, disabled] **Author restriction**
Only the author of a commit can push changes to this repository. This setting is applied on the server level but has been overridden for this project. Contact an admin to change this setting.
Links / references
Documentation blurb
TODO
(Write the start of the documentation of this feature here, include:
- Why should someone use it; what's the underlying problem.
- What is the solution.
- How does someone use this
During implementation, this can then be copied and used as a starter for the documentation.)