Author: sevein
Date: Thu May 17 16:11:32 2012
New Revision: 11686
Log:
Update ACL form to use slug-based permissions (see issue 2263)
Modified:
trunk/apps/qubit/modules/user/actions/editInformationObjectAclAction.class.php
trunk/apps/qubit/modules/user/templates/editInformationObjectAclSuccess.php
Modified:
trunk/apps/qubit/modules/user/actions/editInformationObjectAclAction.class.php
==============================================================================
---
trunk/apps/qubit/modules/user/actions/editInformationObjectAclAction.class.php
Thu May 17 16:10:29 2012 (r11685)
+++
trunk/apps/qubit/modules/user/actions/editInformationObjectAclAction.class.php
Thu May 17 16:11:32 2012 (r11686)
@@ -55,9 +55,9 @@
{
foreach ($permissions as $item)
{
- if (null != ($repositoryId = $item->getConstants(array('name' =>
'repositoryId'))))
+ if (null != ($repository = $item->getConstants(array('name' =>
'repository'))))
{
- $this->repositories[$repositoryId][$item->action] = $item;
+ $this->repositories[$repository][$item->action] = $item;
}
else if (null != $item->objectId && QubitInformationObject::ROOT_ID
!= $item->objectId)
{
@@ -113,7 +113,7 @@
$this->resource->aclPermissions[] = $aclPermission;
}
}
-
+
// Otherwise, update an existing permission
else if (null !== $aclPermission = QubitAclPermission::getById($key))
{
Modified:
trunk/apps/qubit/modules/user/templates/editInformationObjectAclSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/user/templates/editInformationObjectAclSuccess.php
Thu May 17 16:10:29 2012 (r11685)
+++ trunk/apps/qubit/modules/user/templates/editInformationObjectAclSuccess.php
Thu May 17 16:11:32 2012 (r11686)
@@ -88,9 +88,9 @@
<legend><?php echo __('Permissions by %1%', array('%1%' =>
sfConfig::get('app_ui_label_repository'))) ?></legend>
<?php if (0 < count($repositories)): ?>
- <?php foreach ($repositories as $repositoryId => $permissions): ?>
+ <?php foreach ($repositories as $repository => $permissions): ?>
<div class="form-item">
- <?php echo get_component('aclGroup', 'aclTable', array('object' =>
QubitRepository::getById($repositoryId), 'permissions' => $permissions,
'actions' => $basicActions)) ?>
+ <?php echo get_component('aclGroup', 'aclTable', array('object' =>
QubitRepository::getBySlug($repository), 'permissions' => $permissions,
'actions' => $basicActions)) ?>
</div>
<?php endforeach; ?>
<?php endif; ?>
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.