mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix listing of enabled roles in server-find
The roles can be thought of as membership attributes so we should only list them if `--all` is specified and `--no-members` is not. Also do not show them if `--raw` is passed in. https://fedorahosted.org/freeipa/ticket/5181 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
31ffe1a129
commit
a540c909a7
@@ -192,7 +192,10 @@ class server(LDAPObject):
|
||||
entry_attrs['ipalocation_location'] = converted_locations
|
||||
|
||||
def get_enabled_roles(self, entry_attrs, **options):
|
||||
if options.get('raw', False) or options.get('no_members', False):
|
||||
if not options.get('all', False) and options.get('no_members', False):
|
||||
return
|
||||
|
||||
if options.get('raw', False):
|
||||
return
|
||||
|
||||
enabled_roles = self.api.Command.server_role_find(
|
||||
|
||||
Reference in New Issue
Block a user