aboutsummaryrefslogtreecommitdiffstats
path: root/python_moonutilities/python_moonutilities/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'python_moonutilities/python_moonutilities/exceptions.py')
-rw-r--r--python_moonutilities/python_moonutilities/exceptions.py41
1 files changed, 41 insertions, 0 deletions
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