summaryrefslogtreecommitdiff
path: root/lorry-controller-webapp
diff options
context:
space:
mode:
authorBen Hutchings <ben.hutchings@codethink.co.uk>2020-05-14 20:03:12 +0100
committerBen Hutchings <ben.hutchings@codethink.co.uk>2020-06-01 17:07:46 +0100
commit979a37fb44a8e46978daa318c4de3fdc823d2279 (patch)
tree1e7a51974c576ad9c8b0ddd98537a060a934d231 /lorry-controller-webapp
parent91f046b71e0ec46c957da3055a268ff8f0ba45c4 (diff)
downloadlorry-controller-979a37fb44a8e46978daa318c4de3fdc823d2279.tar.gz
Allow creating repos/groups as internal or public on GitLab
GitLab groups can have a visibility of 'private' (only members), 'internal'/'limited' (only authenticated users), or 'public' (anyone). GitLab subgroups and projects can have the same visibilities as groups, but cannot be more visible than the containing group. When mirroring public source code, it may be desirable to make the entities we create more visible than the current default of 'private'. Add an option to set any of the three levels of visibility supported by GitLab, with the default unchanged. (The same levels are supported by Gitea, though with one named differently.) Never change the visibility of a group or repository that already exists. Note that the GitLab connector previously tried to create all projects as public, but this stopped working after the change to API v4. In Gerrit and Gitano the access control model is lot more complex, and generally only administrators can set visibility. Make their connectors reject visibility other than 'private'. Relates to #6, #9.
Diffstat (limited to 'lorry-controller-webapp')
-rwxr-xr-xlorry-controller-webapp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lorry-controller-webapp b/lorry-controller-webapp
index 6fc827e..2c99c08 100755
--- a/lorry-controller-webapp
+++ b/lorry-controller-webapp
@@ -143,6 +143,11 @@ class WEBAPP(cliapp.Application):
['publish-failures'],
'make the status page show failure logs from lorry')
+ self.settings.choice(
+ ['downstream-visibility'],
+ ['private', 'internal', 'public'],
+ 'Visibility of repositories created on Downstream Host (GitLab)')
+
for downstream_type in lorrycontroller.downstream_types.values():
downstream_type.add_app_settings(self.settings)