mirror of
https://github.com/goauthentik/authentik
synced 2026-05-01 11:57:09 +02:00
* clean up roles and permissions This was purposefully not included in `2025.12` to split the changes up. The main content of this patch is in the migrations. Everything else follows more or less automatically. * add breaking change warning to release notes * add `ak_groups` --> `groups` deprecated proxy * fixup! add `ak_groups` --> `groups` deprecated proxy * fixup! add `ak_groups` --> `groups` deprecated proxy * fixup! add `ak_groups` --> `groups` deprecated proxy * add configuration warning to default notifications blueprint * add rudimentary tests for User.ak_groups * remove no longer used permissions * clarify deprecation Co-authored-by: Jens L. <jens@goauthentik.io> Signed-off-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com> * remove integration changes These will be included in a separate PR once this is released. --------- Signed-off-by: Simonyi Gergő <28359278+gergosimonyi@users.noreply.github.com> Co-authored-by: Jens L. <jens@goauthentik.io>
29 lines
599 B
Python
29 lines
599 B
Python
"""
|
|
Exceptions used by ak-guardian. All internal and guardian-specific errors
|
|
should extend GuardianError class.
|
|
"""
|
|
|
|
|
|
class GuardianError(Exception):
|
|
"""Base class for all guardian-specific exceptions."""
|
|
|
|
pass
|
|
|
|
|
|
class InvalidIdentity(GuardianError):
|
|
"""Raised when an object is neither User nor Group nor Role."""
|
|
|
|
pass
|
|
|
|
|
|
class WrongAppError(GuardianError):
|
|
"""Raised when the app name for a permission is incorrect."""
|
|
|
|
pass
|
|
|
|
|
|
class MixedContentTypeError(GuardianError):
|
|
"""Raised when content type for the provided permissions and/or class do not match."""
|
|
|
|
pass
|