From af2eb4d69506b641504d076e79b80c7ee54eeda9 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Wed, 14 May 2014 13:21:14 +0200 Subject: [PATCH] sudorule: Allow adding deny commands when command category set to ALL https://fedorahosted.org/freeipa/ticket/4340 Reviewed-By: Petr Viktorin --- ipalib/plugins/sudorule.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py index b3e71c8f9..95631a4b6 100644 --- a/ipalib/plugins/sudorule.py +++ b/ipalib/plugins/sudorule.py @@ -530,12 +530,6 @@ class sudorule_add_deny_command(LDAPAddMember): def pre_callback(self, ldap, dn, found, not_found, *keys, **options): assert isinstance(dn, DN) - try: - _entry_attrs = ldap.get_entry(dn, self.obj.default_attributes) - except errors.NotFound: - self.obj.handle_not_found(*keys) - if is_all(_entry_attrs, 'cmdcategory'): - raise errors.MutuallyExclusiveError(reason=_("commands cannot be added when command category='all'")) return dn