summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2014-07-31 13:13:29 +0200
committerTomas Babej <tbabej@redhat.com>2014-09-17 14:41:50 +0200
commit9793e44380f8fcdefa1a33fad5fad30ac9a9ac3f (patch)
tree9c38bd867dbdc6c4fbe14132aea2f0815c254c15
parentf6ada7bab3e4773d8c3fdccd72116c163be98300 (diff)
downloadfreeipa-9793e44380f8fcdefa1a33fad5fad30ac9a9ac3f.zip
freeipa-9793e44380f8fcdefa1a33fad5fad30ac9a9ac3f.tar.gz
freeipa-9793e44380f8fcdefa1a33fad5fad30ac9a9ac3f.tar.xz
idvies: Add managed permissions for idview and idoverride objects
Part of: https://fedorahosted.org/freeipa/ticket/3979
-rw-r--r--ACI.txt4
-rw-r--r--ipalib/plugins/idviews.py23
2 files changed, 27 insertions, 0 deletions
diff --git a/ACI.txt b/ACI.txt
index 80b555d..eb88d31 100644
--- a/ACI.txt
+++ b/ACI.txt
@@ -118,8 +118,12 @@ dn: cn=hostgroups,cn=accounts,dc=ipa,dc=example
aci: (targetattr = "businesscategory || cn || createtimestamp || description || entryusn || ipauniqueid || modifytimestamp || o || objectclass || ou || owner || seealso")(targetfilter = "(objectclass=ipahostgroup)")(version 3.0;acl "permission:System: Read Hostgroups";allow (compare,read,search) userdn = "ldap:///all";)
dn: cn=hostgroups,cn=accounts,dc=ipa,dc=example
aci: (targetfilter = "(objectclass=ipahostgroup)")(version 3.0;acl "permission:System: Remove Hostgroups";allow (delete) groupdn = "ldap:///cn=System: Remove Hostgroups,cn=permissions,cn=pbac,dc=ipa,dc=example";)
+dn: cn=views,cn=accounts,dc=ipa,dc=example
+aci: (targetattr = "cn || createtimestamp || description || entryusn || gidnumber || homedirectory || ipaanchoruuid || modifytimestamp || objectclass || uid || uidnumber")(targetfilter = "(objectclass=ipaOverrideAnchor)")(version 3.0;acl "permission:System: Read ID Overrides";allow (compare,read,search) userdn = "ldap:///all";)
dn: cn=ranges,cn=etc,dc=ipa,dc=example
aci: (targetattr = "cn || createtimestamp || entryusn || ipabaseid || ipabaserid || ipaidrangesize || ipanttrusteddomainsid || iparangetype || ipasecondarybaserid || modifytimestamp || objectclass")(targetfilter = "(objectclass=ipaidrange)")(version 3.0;acl "permission:System: Read ID Ranges";allow (compare,read,search) userdn = "ldap:///all";)
+dn: cn=views,cn=accounts,dc=ipa,dc=example
+aci: (targetattr = "cn || createtimestamp || description || entryusn || modifytimestamp || objectclass")(targetfilter = "(objectclass=nsContainer)")(version 3.0;acl "permission:System: Read ID Views";allow (compare,read,search) userdn = "ldap:///all";)
dn: cn=IPA.EXAMPLE,cn=kerberos,dc=ipa,dc=example
aci: (targetattr = "createtimestamp || entryusn || krbdefaultencsalttypes || krbmaxrenewableage || krbmaxticketlife || krbsupportedencsalttypes || modifytimestamp || objectclass")(targetfilter = "(objectclass=krbticketpolicyaux)")(version 3.0;acl "permission:System: Read Default Kerberos Ticket Policy";allow (compare,read,search) groupdn = "ldap:///cn=System: Read Default Kerberos Ticket Policy,cn=permissions,cn=pbac,dc=ipa,dc=example";)
dn: cn=users,cn=accounts,dc=ipa,dc=example
diff --git a/ipalib/plugins/idviews.py b/ipalib/plugins/idviews.py
index b4909de..e7a26de 100644
--- a/ipalib/plugins/idviews.py
+++ b/ipalib/plugins/idviews.py
@@ -64,6 +64,17 @@ class idview(LDAPObject):
),
)
+ permission_filter_objectclasses = ['nsContainer']
+ managed_permissions = {
+ 'System: Read ID Views': {
+ 'ipapermbindruletype': 'all',
+ 'ipapermright': {'read', 'search', 'compare'},
+ 'ipapermdefaultattr': {
+ 'cn', 'description', 'objectClass',
+ },
+ },
+ }
+
@register()
class idview_add(LDAPCreate):
@@ -160,6 +171,18 @@ class idoverride(LDAPObject):
),
)
+ permission_filter_objectclasses = ['ipaOverrideAnchor']
+ managed_permissions = {
+ 'System: Read ID Overrides': {
+ 'ipapermbindruletype': 'all',
+ 'ipapermright': {'read', 'search', 'compare'},
+ 'ipapermdefaultattr': {
+ 'cn', 'objectClass', 'ipaAnchorUUID', 'uidNumber', 'gidNumber',
+ 'description', 'homeDirectory', 'uid',
+ },
+ },
+ }
+
@register()
class idoverride_add(LDAPCreate):