feat: Add support for importing profile data from claims

This commit is contained in:
Ginger committed 2026-07-02 16:34:38 -04:00
1 parent 53d6887b86
commit 06afe4f1a3
9 files changed
+339 -63

No files matched your search

+20
View File
@@ -63,6 +63,16 @@ pub(crate) async fn set_profile_field_route(
return Err!(Request(InvalidParam("You may not change a remote user's profile data.")));
}
if services
.oidc
.restricted_profile_fields()
.contains(&body.value.field_name())
{
return Err!(Request(Forbidden(
"This profile field is controlled by your identity provider."
)));
}
services
.users
.set_profile_field(
@@ -93,6 +103,16 @@ pub(crate) async fn delete_profile_field_route(
return Err!(Request(InvalidParam("You may not change a remote user's profile data.")));
}
if services
.oidc
.restricted_profile_fields()
.contains(&body.field)
{
return Err!(Request(Forbidden(
"This profile field is controlled by your identity provider."
)));
}
services
.users
.set_profile_field(