Hiding Properties, Copy to Scrapbook and Move options from user

Permalink
I have an advanced permission problem. I have to make a page that user can just edit (only few blocks) and nothing else. I am almost there but few things are still pain in my ass. How to hide Properties, Copy to Scrapbook and Move options from user?

Take a look at screenshot.

1 Attachment

Wertti
 
evanadelman replied on at Permalink Reply
would love to know if you were able to solve this and if so how you did it - otherwise i'll be digging into a similar issue shortly
pixelfish replied on at Permalink Reply
pixelfish
Hi,
This is one of the main problems with the permissions i think. I wanted to do the same a while ago, and also seems a few other people do.
leertes replied on at Permalink Reply
leertes
Hi.. had the same problem so this might help.

concrete\tools\page_controls_menu_js.php

I moved all the options to sit inside $cp->canAdminPage like this

around line 110


<?php  if ($cp->canAdminPage()) { ?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-design"><?php echo t('Design')?></a></li>';
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-permissions"><?php echo t('Permissions')?></a></li>';
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-properties"><?php echo t('Properties')?></a></li>';
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-versions"><?php echo t('Versions')?></a></li>';
   menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-mcd"><?php echo t('Move/Delete')?></a></li>';
<?php  } ?>
<?php  } ?>



This is the original
<?php  if ($cp->canWrite()) { ?>
   menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-properties"><?php echo t('Properties')?></a></li>';
<?php  } ?>
<?php  if ($cp->canAdminPage()) { ?>
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-design"><?php echo t('Design')?></a></li>';
menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-permissions"><?php echo t('Permissions')?></a></li>';
<?php  } ?>
<?php  if ($cp->canReadVersions()) { ?>
   menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-versions"><?php echo t('Versions')?></a></li>';
<?php  } ?>
<?php  if ($sh->canRead() || $cp->canDeleteCollection()) { ?>
   menuHTML += '<li class="ccm-main-nav-edit-option" <?php  if (!$c->isEditMode()) { ?> style="display: none" <?php  } ?>><a href="javascript:void(0)" id="ccm-nav-mcd"><?php echo t('Move/Delete')?></a></li>';
<?php  } ?>
<?php  } ?>
Mnkras replied on at Permalink Reply
Mnkras
just a small note on the above, if they try the urls for things that they have permission to (even if its hidden in the menu) that won't stop them ;)