summaryrefslogtreecommitdiffstats
path: root/ipalib/errors.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2012-06-20 16:08:33 +0300
committerMartin Kosek <mkosek@redhat.com>2012-06-28 16:53:33 +0200
commita6ff85f425d5c38dd89fcd8999e0d62eadb969a1 (patch)
tree04ae9b01be916209b2156e915da7ebddff065fc0 /ipalib/errors.py
parent52f69aaa8ab4d633bbeb96799bf96e8a715d0ae0 (diff)
downloadfreeipa-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.tar.gz
freeipa-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.tar.xz
freeipa-a6ff85f425d5c38dd89fcd8999e0d62eadb969a1.zip
Add support for external group members
When using ipaExternalGroup/ipaExternalMember attributes it is possible to add group members which don't exist in IPA database. This is primarily is required for AD trusts support and therefore validation is accepting only secure identifier (SID) format. https://fedorahosted.org/freeipa/ticket/2664
Diffstat (limited to 'ipalib/errors.py')
-rw-r--r--ipalib/errors.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/ipalib/errors.py b/ipalib/errors.py
index 407d9f7db..c25560b8e 100644
--- a/ipalib/errors.py
+++ b/ipalib/errors.py
@@ -1277,6 +1277,56 @@ class SingleMatchExpected(ExecutionError):
format = _('The search criteria was not specific enough. Expected 1 and found %(found)d.')
+class AlreadyExternalGroup(ExecutionError):
+ """
+ **4028** Raised when a group is already an external member group
+
+ For example:
+
+ >>> raise AlreadyExternalGroup
+ Traceback (most recent call last):
+ ...
+ AlreadyExternalGroup: This group already allows external members
+
+ """
+
+ errno = 4028
+ format = _('This group already allows external members')
+
+class ExternalGroupViolation(ExecutionError):
+ """
+ **4029** Raised when a group is already an external member group
+ and an attempt is made to use it as posix group
+
+ For example:
+
+ >>> raise ExternalGroupViolation
+ Traceback (most recent call last):
+ ...
+ ExternalGroupViolation: This group cannot be posix because it is external
+
+ """
+
+ errno = 4029
+ format = _('This group cannot be posix because it is external')
+
+class PosixGroupViolation(ExecutionError):
+ """
+ **4030** Raised when a group is already a posix group
+ and cannot be converted to external
+
+ For example:
+
+ >>> raise PosixGroupViolation
+ Traceback (most recent call last):
+ ...
+ PosixGroupViolation: This is already a posix group and cannot be converted to external one
+
+ """
+
+ errno = 4030
+ format = _('This is already a posix group and cannot be converted to external one')
+
class BuiltinError(ExecutionError):
"""
**4100** Base class for builtin execution errors (*4100 - 4199*).