mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Revert "Search allowed attributes in superior objectclasses"
This reverts commit a58cbb985e
.
We are going to take another approach to this. Instead of erroring
out on attributes that don't seem to be allowed we are going to
eventually return a warning.
This commit is contained in:
parent
e1f6962545
commit
4416c185de
@ -413,9 +413,6 @@ class ldap2(CrudBackend, Encoder):
|
||||
obj = self.schema.get_obj(_ldap.schema.ObjectClass, oc)
|
||||
if obj is not None:
|
||||
allowed_attributes += obj.must + obj.may
|
||||
# look for allowed attributes in the superior objectclasses
|
||||
if obj.sup:
|
||||
allowed_attributes += self.get_allowed_attributes(obj.sup,raise_on_unknown)
|
||||
elif raise_on_unknown:
|
||||
raise errors.NotFound(reason=_('objectclass %s not found') % oc)
|
||||
return [unicode(a).lower() for a in list(set(allowed_attributes))]
|
||||
|
@ -702,41 +702,6 @@ class test_permission(Declarative):
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Create permission %r with attributes from superior objectclass' % permission1,
|
||||
command=(
|
||||
'permission_add', [permission1], dict(
|
||||
type=u'hostgroup',
|
||||
permissions=[u'add', u'delete', u'write'],
|
||||
attrs=[u'businessCategory', u'owner', u'description'],
|
||||
)
|
||||
),
|
||||
expected=dict(
|
||||
value=permission1,
|
||||
summary=u'Added permission "%s"' % permission1,
|
||||
result=dict(
|
||||
dn=lambda x: DN(x) == permission1_dn,
|
||||
cn=[permission1],
|
||||
objectclass=objectclasses.permission,
|
||||
type=u'hostgroup',
|
||||
permissions=[u'add',u'delete',u'write'],
|
||||
attrs=[u'businesscategory',u'owner',u'description'],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Delete %r' % permission1,
|
||||
command=('permission_del', [permission1], {}),
|
||||
expected=dict(
|
||||
result=dict(failed=u''),
|
||||
value=permission1,
|
||||
summary=u'Deleted permission "%s"' % permission1,
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
dict(
|
||||
desc='Create targetgroup permission %r' % permission1,
|
||||
command=(
|
||||
|
Loading…
Reference in New Issue
Block a user