Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OIDC/Auth2 integration #2649

Open
wants to merge 8 commits into
base: feature/keycloak-oidc
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Cleanup saml and auth service based code
boehlke committed Sep 27, 2024
commit 8b3b0090c26be04d2363934345c765fb8f6220ba
25 changes: 0 additions & 25 deletions openslides_backend/action/actions/organization/update.py
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@
from ...mixins.send_email_mixin import EmailCheckMixin, EmailSenderCheckMixin
from ...util.default_schema import DefaultSchema
from ...util.register import register_action
from ..user.save_saml_account import allowed_user_fields
from ..user.update import UserUpdate


@@ -48,36 +47,12 @@ class OrganizationUpdate(
"limit_of_meetings",
"limit_of_users",
"url",
"saml_enabled",
"saml_login_button_text",
"saml_attr_mapping",
"saml_metadata_idp",
"saml_metadata_sp",
"saml_private_key",
)

model = Organization()
saml_props = {
field: {**optional_str_schema, "max_length": 256}
for field in allowed_user_fields
}
saml_props["meeting"] = {
"type": ["object", "null"],
"properties": {
field: {**optional_str_schema, "max_length": 256}
for field in ("external_id", "external_group_id")
},
"additionalProperties": False,
}
schema = DefaultSchema(Organization()).get_update_schema(
optional_properties=group_A_fields + group_B_fields,
additional_optional_fields={
"saml_attr_mapping": {
"type": ["object", "null"],
"properties": saml_props,
"required": ["saml_id"],
"additionalProperties": False,
},
},
Comment on lines 55 to 56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is going to be empty, you can delete the additional_optional_fields attribute.

)
check_email_field = "users_email_replyto"
7 changes: 0 additions & 7 deletions openslides_backend/action/actions/user/__init__.py
Original file line number Diff line number Diff line change
@@ -4,17 +4,10 @@
assign_meetings,
create,
delete,
forget_password,
forget_password_confirm,
generate_new_password,
merge_together,
participant_import,
participant_json_upload,
reset_password_to_default,
save_saml_account,
send_invitation_email,
set_password,
set_password_self,
set_present,
toggle_presence_by_number,
update,
2 changes: 0 additions & 2 deletions openslides_backend/action/actions/user/create.py
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@
from ...util.typing import ActionResultElement
from ..meeting_user.mixin import CheckLockOutPermissionMixin
from .create_update_permissions_mixin import CreateUpdatePermissionsMixin
from .password_mixins import SetPasswordMixin
from .user_mixins import LimitOfUserMixin, UserMixin, UsernameMixin, check_gender_helper


@@ -25,7 +24,6 @@ class UserCreate(
EmailCheckMixin,
CreateAction,
CreateUpdatePermissionsMixin,
SetPasswordMixin,
LimitOfUserMixin,
UsernameMixin,
CheckLockOutPermissionMixin,
119 changes: 0 additions & 119 deletions openslides_backend/action/actions/user/forget_password.py

This file was deleted.

63 changes: 0 additions & 63 deletions openslides_backend/action/actions/user/forget_password_confirm.py

This file was deleted.

39 changes: 0 additions & 39 deletions openslides_backend/action/actions/user/generate_new_password.py

This file was deleted.

51 changes: 0 additions & 51 deletions openslides_backend/action/actions/user/password_mixins.py

This file was deleted.

Loading