Skip to content

Commit

Permalink
providers: add provider/ prefix for property mappings API (#10874)
Browse files Browse the repository at this point in the history
  • Loading branch information
rissson authored Aug 12, 2024
1 parent dab41fe commit a7203be
Show file tree
Hide file tree
Showing 45 changed files with 284 additions and 196 deletions.
2 changes: 1 addition & 1 deletion authentik/enterprise/providers/google_workspace/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class GoogleWorkspaceProviderMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-google-workspace-form"
return "ak-property-mapping-provider-google-workspace-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/enterprise/providers/microsoft_entra/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class MicrosoftEntraProviderMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-microsoft-entra-form"
return "ak-property-mapping-provider-microsoft-entra-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.8 on 2024-08-12 12:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("authentik_providers_rac", "0004_alter_connectiontoken_expires"),
]

operations = [
migrations.AlterModelOptions(
name="racpropertymapping",
options={
"verbose_name": "RAC Provider Property Mapping",
"verbose_name_plural": "RAC Provider Property Mappings",
},
),
]
6 changes: 3 additions & 3 deletions authentik/enterprise/providers/rac/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def evaluate(self, user: User | None, request: HttpRequest | None, **kwargs) ->

@property
def component(self) -> str:
return "ak-property-mapping-rac-form"
return "ak-property-mapping-provider-rac-form"

@property
def serializer(self) -> type[Serializer]:
Expand All @@ -136,8 +136,8 @@ def serializer(self) -> type[Serializer]:
return RACPropertyMappingSerializer

class Meta:
verbose_name = _("RAC Property Mapping")
verbose_name_plural = _("RAC Property Mappings")
verbose_name = _("RAC Provider Property Mapping")
verbose_name_plural = _("RAC Provider Property Mappings")


class ConnectionToken(ExpiringModel):
Expand Down
2 changes: 1 addition & 1 deletion authentik/enterprise/providers/rac/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

api_urlpatterns = [
("providers/rac", RACProviderViewSet),
("propertymappings/rac", RACPropertyMappingViewSet),
("propertymappings/provider/rac", RACPropertyMappingViewSet),
("rac/endpoints", EndpointViewSet),
("rac/connection_tokens", ConnectionTokenViewSet),
]
2 changes: 1 addition & 1 deletion authentik/providers/oauth2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class ScopeMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-scope-form"
return "ak-property-mapping-provider-scope-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/providers/oauth2/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

api_urlpatterns = [
("providers/oauth2", OAuth2ProviderViewSet),
("propertymappings/scope", ScopeMappingViewSet),
("propertymappings/provider/scope", ScopeMappingViewSet),
("oauth2/authorization_codes", AuthorizationCodeViewSet),
("oauth2/refresh_tokens", RefreshTokenViewSet),
("oauth2/access_tokens", AccessTokenViewSet),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.8 on 2024-08-12 12:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("authentik_providers_radius", "0003_radiusproviderpropertymapping"),
]

operations = [
migrations.AlterModelOptions(
name="radiusproviderpropertymapping",
options={
"verbose_name": "Radius Provider Property Mapping",
"verbose_name_plural": "Radius Provider Property Mappings",
},
),
]
8 changes: 4 additions & 4 deletions authentik/providers/radius/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RadiusProviderPropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-radius-form"
return "ak-property-mapping-provider-radius-form"

@property
def serializer(self) -> type[Serializer]:
Expand All @@ -81,8 +81,8 @@ def serializer(self) -> type[Serializer]:
return RadiusProviderPropertyMappingSerializer

def __str__(self):
return f"Radius Property Mapping {self.name}"
return f"Radius Provider Property Mapping {self.name}"

class Meta:
verbose_name = _("Radius Property Mapping")
verbose_name_plural = _("Radius Property Mappings")
verbose_name = _("Radius Provider Property Mapping")
verbose_name_plural = _("Radius Provider Property Mappings")
2 changes: 1 addition & 1 deletion authentik/providers/radius/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)

api_urlpatterns = [
("propertymappings/radius", RadiusProviderPropertyMappingViewSet),
("propertymappings/provider/radius", RadiusProviderPropertyMappingViewSet),
("outposts/radius", RadiusOutpostConfigViewSet, "radiusprovideroutpost"),
("providers/radius", RadiusProviderViewSet),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.8 on 2024-08-12 12:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("authentik_providers_saml", "0014_alter_samlprovider_digest_algorithm_and_more"),
]

operations = [
migrations.AlterModelOptions(
name="samlpropertymapping",
options={
"verbose_name": "SAML Provider Property Mapping",
"verbose_name_plural": "SAML Provider Property Mappings",
},
),
]
6 changes: 3 additions & 3 deletions authentik/providers/saml/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class SAMLPropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-saml-form"
return "ak-property-mapping-provider-saml-form"

@property
def serializer(self) -> type[Serializer]:
Expand All @@ -204,8 +204,8 @@ def __str__(self):
return f"{self.name} ({name})"

class Meta:
verbose_name = _("SAML Property Mapping")
verbose_name_plural = _("SAML Property Mappings")
verbose_name = _("SAML Provider Property Mapping")
verbose_name_plural = _("SAML Provider Property Mappings")


class SAMLProviderImportModel(CreatableType, Provider):
Expand Down
2 changes: 1 addition & 1 deletion authentik/providers/saml/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
]

api_urlpatterns = [
("propertymappings/saml", SAMLPropertyMappingViewSet),
("propertymappings/provider/saml", SAMLPropertyMappingViewSet),
("providers/saml", SAMLProviderViewSet),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.8 on 2024-08-12 12:54

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
("authentik_providers_scim", "0008_rename_scimgroup_scimprovidergroup_and_more"),
]

operations = [
migrations.AlterModelOptions(
name="scimmapping",
options={
"verbose_name": "SCIM Provider Mapping",
"verbose_name_plural": "SCIM Provider Mappings",
},
),
]
8 changes: 4 additions & 4 deletions authentik/providers/scim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class SCIMMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-scim-form"
return "ak-property-mapping-provider-scim-form"

@property
def serializer(self) -> type[Serializer]:
Expand All @@ -142,8 +142,8 @@ def serializer(self) -> type[Serializer]:
return SCIMMappingSerializer

def __str__(self):
return f"SCIM Mapping {self.name}"
return f"SCIM Provider Mapping {self.name}"

class Meta:
verbose_name = _("SCIM Mapping")
verbose_name_plural = _("SCIM Mappings")
verbose_name = _("SCIM Provider Mapping")
verbose_name_plural = _("SCIM Provider Mappings")
2 changes: 1 addition & 1 deletion authentik/providers/scim/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
("providers/scim", SCIMProviderViewSet),
("providers/scim_users", SCIMProviderUserViewSet),
("providers/scim_groups", SCIMProviderGroupViewSet),
("propertymappings/scim", SCIMMappingViewSet),
("propertymappings/provider/scim", SCIMMappingViewSet),
]
2 changes: 1 addition & 1 deletion authentik/sources/ldap/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ class LDAPSourcePropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-ldap-source-form"
return "ak-property-mapping-source-ldap-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/sources/oauth/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class OAuthSourcePropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-oauth-source-form"
return "ak-property-mapping-source-oauth-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/sources/plex/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class PlexSourcePropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-plex-source-form"
return "ak-property-mapping-source-plex-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/sources/saml/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class SAMLSourcePropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-saml-source-form"
return "ak-property-mapping-source-saml-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
2 changes: 1 addition & 1 deletion authentik/sources/scim/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class SCIMSourcePropertyMapping(PropertyMapping):

@property
def component(self) -> str:
return "ak-property-mapping-scim-source-form"
return "ak-property-mapping-source-scim-form"

@property
def serializer(self) -> type[Serializer]:
Expand Down
Loading

0 comments on commit a7203be

Please sign in to comment.