Oct 3, 2022
pulpcore: https://github.com/pulp/pulpcore/pull/3190
pulp_file: https://github.com/pulp/pulp_file/pull/810/
discourse: https://discourse.pulpproject.org/t/new-multi-tenancy-feature-domains/635/3
unique_together
constraintUser
, Group
, AccessPolicy
, Role
While the Domain
object will always be present in Pulp, the features enabled by domains will be off by default. Turning on domains will be controlled through settings DOMAIN_ENABLED
.
PulpPluginConfig
V3_DOMAIN_API_ROOT
API_ROOT/<domain_path>/api/v3/
- e.g. /pulp/<domain_path>/api/v3/
{domain_path}
added to the end of CONTENT_ORIGIN
CONTENT_ORIGIN/{domain_path}/{path}
-e.g. `/pulp/content/{domain_path}/default
domain
To have files uploaded to their correct domain FieldFile
used for Artifact
and TemporaryFile
's FileField
has been customized
Adding domain to the URL would change the signatures for all our viewsets, so a new middleware has been added to intercept and remove the domain_path
, setting it on the request object before calling the viewset's handler.
To avoid having to modify every serializer to handle the new domain parameter for object creation a new hidden field has been added to the ModelSerializer
There is a new level for permissions: Domain-level, and with it comes new Global Access Conditions.
domain
relation to all models without it
Content
models as base Content
does not have it.domain
field and have correct uniqueness constraintValidateFieldsMixin
has a method for thisdomain
field.
domain
in the dispatch
call.has_domain_perms
checks to the viewset's AccessPolicies.{domain_path}
if DOMAIN_ENABLED
domain_compatiable = True
to PluginAppConfig