Provide attributelevelrights for the aci components in permission_show.

Since the broken-out components are just part of the aci just copy right access rights for aci.

ticket 943

rob
>From 7289204b5b3394e41ddbf4351c372740c6d483b1 Mon Sep 17 00:00:00 2001
From: Rob Crittenden <rcrit...@redhat.com>
Date: Wed, 13 Apr 2011 11:30:23 -0400
Subject: [PATCH] Provide attributelevelrights for the aci components in permission_show.

Since the broken-out components are just part of the aci just copy right
access rights for aci.

ticket 943
---
 ipalib/plugins/permission.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index ac8b09b..07a4dd0 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -414,6 +414,11 @@ class permission_show(LDAPRetrieve):
                     entry_attrs[attr] = aci[attr]
         except errors.NotFound:
             self.debug('ACI not found for %s' % entry_attrs['cn'][0])
+        if options.get('rights', False) and options.get('all', False):
+            # The ACI attributes are just broken-out components of aci so
+            # the rights should all match it.
+            for attr in self.obj.aci_attributes:
+                entry_attrs['attributelevelrights'][attr] = entry_attrs['attributelevelrights']['aci']
         return dn
 
 api.register(permission_show)
-- 
1.7.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to