Author: sevein
Date: Mon Jul 16 12:23:00 2012
New Revision: 11931
Log:
Hide rights when user is not authenticated, fixes issue 2382
Modified:
trunk/plugins/sfDcPlugin/modules/sfDcPlugin/templates/indexSuccess.php
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
trunk/plugins/sfModsPlugin/modules/sfModsPlugin/templates/indexSuccess.php
trunk/plugins/sfRadPlugin/modules/sfRadPlugin/templates/indexSuccess.php
Modified: trunk/plugins/sfDcPlugin/modules/sfDcPlugin/templates/indexSuccess.php
==============================================================================
--- trunk/plugins/sfDcPlugin/modules/sfDcPlugin/templates/indexSuccess.php
Mon Jul 16 11:34:40 2012 (r11930)
+++ trunk/plugins/sfDcPlugin/modules/sfDcPlugin/templates/indexSuccess.php
Mon Jul 16 12:23:00 2012 (r11931)
@@ -82,13 +82,17 @@
<?php echo render_show(__('Rights'),
render_value($resource->getAccessConditions(array('cultureFallback' => true))))
?>
-<div class="section" id="rightsArea">
+<?php if ($sf_user->isAuthenticated()): ?>
- <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
+ <div class="section" id="rightsArea">
- <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+ <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
-</div> <!-- /.section#rightsArea -->
+ <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+
+ </div> <!-- /.section#rightsArea -->
+
+<?php endif; ?>
<?php if (0 < count($resource->digitalObjects)): ?>
Modified:
trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
==============================================================================
--- trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
Mon Jul 16 11:34:40 2012 (r11930)
+++ trunk/plugins/sfIsadPlugin/modules/sfIsadPlugin/templates/indexSuccess.php
Mon Jul 16 12:23:00 2012 (r11931)
@@ -216,13 +216,17 @@
</div> <!-- /.section#descriptionControlArea -->
-<div class="section" id="rightsArea">
+<?php if ($sf_user->isAuthenticated()): ?>
- <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
+ <div class="section" id="rightsArea">
- <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+ <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
-</div> <!-- /.section#rightsArea -->
+ <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+
+ </div> <!-- /.section#rightsArea -->
+
+<php endif; ?>
<?php if (0 < count($resource->digitalObjects)): ?>
Modified:
trunk/plugins/sfModsPlugin/modules/sfModsPlugin/templates/indexSuccess.php
==============================================================================
--- trunk/plugins/sfModsPlugin/modules/sfModsPlugin/templates/indexSuccess.php
Mon Jul 16 11:34:40 2012 (r11930)
+++ trunk/plugins/sfModsPlugin/modules/sfModsPlugin/templates/indexSuccess.php
Mon Jul 16 12:23:00 2012 (r11931)
@@ -76,13 +76,17 @@
</div>
</div>
-<div class="section" id="rightsArea">
+<?php if ($sf_user->isAuthenticated()): ?>
- <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
+ <div class="section" id="rightsArea">
- <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+ <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
-</div> <!-- /.section#rightsArea -->
+ <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+
+ </div> <!-- /.section#rightsArea -->
+
+<?php endif; ?>
<?php if (0 < count($resource->digitalObjects)): ?>
Modified:
trunk/plugins/sfRadPlugin/modules/sfRadPlugin/templates/indexSuccess.php
==============================================================================
--- trunk/plugins/sfRadPlugin/modules/sfRadPlugin/templates/indexSuccess.php
Mon Jul 16 11:34:40 2012 (r11930)
+++ trunk/plugins/sfRadPlugin/modules/sfRadPlugin/templates/indexSuccess.php
Mon Jul 16 12:23:00 2012 (r11931)
@@ -264,13 +264,17 @@
</div> <!-- /.section -->
-<div class="section" id="rightsArea">
+<?php if ($sf_user->isAuthenticated()): ?>
- <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
+ <div class="section" id="rightsArea">
- <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+ <?php echo link_to_if(QubitAcl::check($resource, 'update'),
'<h2>'.__('Rights area').'</h2>', array($resource, 'module' =>
'informationobject', 'action' => 'edit'), array('anchor' => 'rightsArea',
'title' => __('Edit rights area'))) ?>
-</div> <!-- /.section#rightsArea -->
+ <?php echo get_component('right', 'relatedRights', array('resource' =>
$resource)) ?>
+
+ </div> <!-- /.section#rightsArea -->
+
+<?php endif; ?>
<?php if (0 < count($resource->digitalObjects)): ?>
--
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.