diff options
Diffstat (limited to 'python_moonutilities')
-rw-r--r-- | python_moonutilities/Changelog | 6 | ||||
-rw-r--r-- | python_moonutilities/python_moonutilities/__init__.py | 2 | ||||
-rw-r--r-- | python_moonutilities/python_moonutilities/exceptions.py | 41 |
3 files changed, 47 insertions, 2 deletions
diff --git a/python_moonutilities/Changelog b/python_moonutilities/Changelog index 4c08f10c..e6ab2f6e 100644 --- a/python_moonutilities/Changelog +++ b/python_moonutilities/Changelog @@ -85,4 +85,8 @@ CHANGES 1.4.7 ----- -- Delete the auth.py file to remove some code duplication
\ No newline at end of file +- Delete the auth.py file to remove some code duplication + +1.4.8 +----- +- Add SubjectScopeExisting, ObjectScopeExisting, ActionScopeExisting exceptions
\ No newline at end of file diff --git a/python_moonutilities/python_moonutilities/__init__.py b/python_moonutilities/python_moonutilities/__init__.py index 43f8645f..cabb4c52 100644 --- a/python_moonutilities/python_moonutilities/__init__.py +++ b/python_moonutilities/python_moonutilities/__init__.py @@ -3,6 +3,6 @@ # license which can be found in the file 'LICENSE' in this package distribution # or at 'http://www.apache.org/licenses/LICENSE-2.0'. -__version__ = "1.4.7" +__version__ = "1.4.8" diff --git a/python_moonutilities/python_moonutilities/exceptions.py b/python_moonutilities/python_moonutilities/exceptions.py index f3763428..f1dcd31e 100644 --- a/python_moonutilities/python_moonutilities/exceptions.py +++ b/python_moonutilities/python_moonutilities/exceptions.py @@ -282,6 +282,26 @@ class ActionUnknown(AdminPerimeter): logger = "ERROR" +class SubjectExisting(AdminPerimeter): + description = _("The given subject is existing.") + code = 409 + title = 'Subject Existing' + logger = "ERROR" + + +class ObjectExisting(AdminPerimeter): + description = _("The given object is existing.") + code = 409 + title = 'Object Existing' + logger = "ERROR" + + +class ActionExisting(AdminPerimeter): + description = _("The given action is existing.") + code = 409 + title = 'Action Existing' + logger = "ERROR" + class SubjectNameExisting(AdminPerimeter): description = _("The given subject name is existing.") code = 400 @@ -338,6 +358,27 @@ class ActionScopeUnknown(AdminScope): logger = "ERROR" +class SubjectScopeExisting(AdminScope): + description = _("The given subject scope is existing.") + code = 409 + title = 'Subject Scope Existing' + logger = "ERROR" + + +class ObjectScopeExisting(AdminScope): + description = _("The given object scope is existing.") + code = 409 + title = 'Object Scope Existing' + logger = "ERROR" + + +class ActionScopeExisting(AdminScope): + description = _("The given action scope is existing.") + code = 409 + title = 'Action Scope Existing' + logger = "ERROR" + + class SubjectScopeNameExisting(AdminScope): description = _("The given subject scope name is existing.") code = 400 |