mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add labels so HBAC and Sudo rules show under hosts/hostgroups.
Also fix a bunch of trailing whitespace. https://fedorahosted.org/freeipa/ticket/1751
This commit is contained in:
parent
3bfd49a465
commit
f7753bf55c
@ -105,6 +105,12 @@ global_output_params = (
|
|||||||
Str('member_sudocmd?',
|
Str('member_sudocmd?',
|
||||||
label='Member Sudo commands',
|
label='Member Sudo commands',
|
||||||
),
|
),
|
||||||
|
Str('memberof_sudorule?',
|
||||||
|
label='Member of Sudo rule',
|
||||||
|
),
|
||||||
|
Str('memberof_hbacrule?',
|
||||||
|
label='Member of HBAC rule',
|
||||||
|
),
|
||||||
Str('memberindirect_user?',
|
Str('memberindirect_user?',
|
||||||
label=_('Indirect Member users'),
|
label=_('Indirect Member users'),
|
||||||
),
|
),
|
||||||
@ -144,6 +150,12 @@ global_output_params = (
|
|||||||
Str('memberofindirect_role?',
|
Str('memberofindirect_role?',
|
||||||
label='Indirect Member of role',
|
label='Indirect Member of role',
|
||||||
),
|
),
|
||||||
|
Str('memberofindirect_sudorule?',
|
||||||
|
label='Indirect Member of Sudo rule',
|
||||||
|
),
|
||||||
|
Str('memberofindirect_hbacrule?',
|
||||||
|
label='Indirect Member of HBAC rule',
|
||||||
|
),
|
||||||
Str('externalhost?',
|
Str('externalhost?',
|
||||||
label=_('External host'),
|
label=_('External host'),
|
||||||
),
|
),
|
||||||
@ -688,12 +700,12 @@ last, after all sets and adds."""),
|
|||||||
|
|
||||||
def process_attr_options(self, entry_attrs, dn, keys, options):
|
def process_attr_options(self, entry_attrs, dn, keys, options):
|
||||||
"""
|
"""
|
||||||
Process all --setattr, --addattr, and --delattr options and add the
|
Process all --setattr, --addattr, and --delattr options and add the
|
||||||
resulting value to the list of attributes. --setattr is processed first,
|
resulting value to the list of attributes. --setattr is processed first,
|
||||||
then --addattr and finally --delattr.
|
then --addattr and finally --delattr.
|
||||||
|
|
||||||
When --setattr is not used then the original LDAP object is looked up
|
When --setattr is not used then the original LDAP object is looked up
|
||||||
(of course, not when dn is None) and the changes are applied to old
|
(of course, not when dn is None) and the changes are applied to old
|
||||||
object values.
|
object values.
|
||||||
|
|
||||||
Attribute values deleted by --delattr may be deleted from attribute
|
Attribute values deleted by --delattr may be deleted from attribute
|
||||||
@ -702,7 +714,7 @@ last, after all sets and adds."""),
|
|||||||
|
|
||||||
--addattr=attribute=foo --delattr=attribute=foo
|
--addattr=attribute=foo --delattr=attribute=foo
|
||||||
|
|
||||||
AttrValueNotFound exception may be raised when an attribute value was
|
AttrValueNotFound exception may be raised when an attribute value was
|
||||||
not found either by --setattr and --addattr nor in existing LDAP object.
|
not found either by --setattr and --addattr nor in existing LDAP object.
|
||||||
|
|
||||||
:param entry_attrs: A list of attributes that will be updated
|
:param entry_attrs: A list of attributes that will be updated
|
||||||
|
@ -80,6 +80,7 @@ class WebUIApp(object):
|
|||||||
f = None
|
f = None
|
||||||
try:
|
try:
|
||||||
f = open(requested_file, 'r')
|
f = open(requested_file, 'r')
|
||||||
|
api.log.info('Request file %s' % requested_file)
|
||||||
start_response('200 OK', [('Content-Type', mime_type)])
|
start_response('200 OK', [('Content-Type', mime_type)])
|
||||||
return [f.read()]
|
return [f.read()]
|
||||||
except IOError:
|
except IOError:
|
||||||
@ -88,6 +89,7 @@ class WebUIApp(object):
|
|||||||
finally:
|
finally:
|
||||||
if f is not None:
|
if f is not None:
|
||||||
f.close()
|
f.close()
|
||||||
|
api.log.info('Request done')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user