Allow hiding of some hosting services and SCMs during repository config.
Review Request #10879 — Created Feb. 3, 2020 and submitted
This introduces new attributes to
HostingServiceto completely hide a
hosting service from configuration or to hide specific supported SCMs.
This is done to keep some level of support enabled in Review Board for
hosting service configuration or their SCMs that may no longer be
supported by the service itself.
If configuring an instance that is using an otherwise-hidden hosting
service or SCM, it will continue to be shown during repository
configuration. This ensures that loading a repository doesn't result in
us showing incorrect information.
To mark a
HostingServiceas hidden, simply set
visible = Falseon
To mark SCMs on a
HostingServiceas hidden, the
attribute needs to be set to a list of all the visible SCMTool
IDs/names. If this is not set (
Noneis the default), then any code
that accesses it will need to fall back on
because we would need a class-level property, which we can't do at this
Unit tests passed.
Tested creating and editing repositories with visible
Tested setting some services and SCMs on a service as hidden and verifying
that they didn't show up by default. Then tested by editing repositories
that were using those and verified that they were showing up and could be
Typo in summary: hidding -> hiding