mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Raise DuplicateEntry Error when adding a duplicate sudo option
https://fedorahosted.org/freeipa/ticket/1276 https://fedorahosted.org/freeipa/ticket/1277 https://fedorahosted.org/freeipa/ticket/1308 Added new Exception: AttrValueNotFound Fixed XML Test for Sudorule remove_option 1276 (Raise AttrValueNotFound when trying to remove a non-existent option from Sudo rule) 1277 (Raise DuplicateEntry Error when adding a duplicate sudo option) 1308 (Make sudooption a required option for sudorule_remove_option)
This commit is contained in:
committed by
Rob Crittenden
parent
0377123b19
commit
44cdf8ef54
@@ -1192,6 +1192,24 @@ class ReverseMemberError(ExecutionError):
|
||||
format = _('A problem was encountered when verifying that all members were %(verb)s: %(exc)s')
|
||||
|
||||
|
||||
class AttrValueNotFound(ExecutionError):
|
||||
"""
|
||||
**4026** Raised when an Attribute/Value pair is not found.
|
||||
|
||||
For example:
|
||||
|
||||
>>> raise NotFound(attr='ipasudoopt', value='authenticate')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
AttrValueNotFound: ipasudoopt does not contain 'authenticate'.
|
||||
|
||||
"""
|
||||
|
||||
errno = 4026
|
||||
rval = 1
|
||||
format = _('%(attr)s does not contain \'%(value)s\'')
|
||||
|
||||
|
||||
class BuiltinError(ExecutionError):
|
||||
"""
|
||||
**4100** Base class for builtin execution errors (*4100 - 4199*).
|
||||
|
||||
Reference in New Issue
Block a user