Skip to content

fix(api/auth): make groups optional#185

Merged
CammilleCC merged 4 commits intomainfrom
fix/auth-optional-groups
Feb 20, 2026
Merged

fix(api/auth): make groups optional#185
CammilleCC merged 4 commits intomainfrom
fix/auth-optional-groups

Conversation

@CammilleCC
Copy link
Member

Looks like some users do not have EuXFEL-related groups. We make this optional, which shouldn't case much problems as it is not used for the meantime.

Thanks Thomas M.!

Co-authored-by: Thomas Michelat <32831491+tmichela@users.noreply.github.com>
family_name: str
given_name: str
groups: list[str]
groups: list[str] = Field(default_factory=list)
Copy link
Member

Choose a reason for hiding this comment

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

Also there are now non-default arguments following this default argument. Is this a problem with Pydantic? I know it is with dataclasses.

Copy link
Member Author

Choose a reason for hiding this comment

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

When using BaseModel, ordering of field with(out) defaults is not strict (there's also an example in their docs). If pydantic.dataclasses.dataclass is used, it will be strict like in the built-in dataclasses.

Quick fix: we just mount the `certs` folder on the production Docker
compose file.
(also copied the necessary certs on that folder in the production host)
@CammilleCC
Copy link
Member Author

Merging now, thanks for the review!

@CammilleCC CammilleCC merged commit e006caf into main Feb 20, 2026
@CammilleCC CammilleCC deleted the fix/auth-optional-groups branch February 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants