From 13f3ba5eb009a4af3bdb60a54e058fb5f62545dd Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 26 Mar 2014 16:21:26 +0100 Subject: [PATCH] Add managed read permission to hostgroup Part of the work for: https://fedorahosted.org/freeipa/ticket/3566 Reviewed-By: Martin Kosek --- ipalib/plugins/hostgroup.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/ipalib/plugins/hostgroup.py b/ipalib/plugins/hostgroup.py index a3dd3a4a9..9c125131d 100644 --- a/ipalib/plugins/hostgroup.py +++ b/ipalib/plugins/hostgroup.py @@ -72,6 +72,25 @@ class hostgroup(LDAPObject): 'memberindirect': ['host', 'hostgroup'], 'memberofindirect': ['hostgroup', 'hbacrule', 'sudorule'], } + managed_permissions = { + 'System: Read Hostgroups': { + 'replaces_global_anonymous_aci': True, + 'ipapermbindruletype': 'all', + 'ipapermright': {'read', 'search', 'compare'}, + 'ipapermdefaultattr': { + 'businesscategory', 'cn', 'description', 'ipauniqueid', 'o', + 'objectclass', 'ou', 'owner', 'seealso', + }, + }, + 'System: Read Hostgroup Membership': { + 'replaces_global_anonymous_aci': True, + 'ipapermbindruletype': 'all', + 'ipapermright': {'read', 'search', 'compare'}, + 'ipapermdefaultattr': { + 'member', 'memberof', + }, + }, + } label = _('Host Groups') label_singular = _('Host Group')