Skip to content

Commit

Permalink
Edit view page uf Users to hide function buttons the user doesn't hav…
Browse files Browse the repository at this point in the history
…e access to.
  • Loading branch information
stinkinkevin committed Nov 5, 2015
1 parent e1780ee commit 22569b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/View/Users/view.ctp
Expand Up @@ -26,8 +26,10 @@
<div class="actions">
<h3>Actions</h3>
<ul>
<?php if ($current_user['id'] == $user['User']['id']): ?>
<li><?php echo $this->Html->link('Edit User', array('action' => 'edit', $user['User']['id'])); ?> </li>
<li><?php echo $this->Form->postLink('Delete User', array('action' => 'delete', $user['User']['id']), array('confirm'=>'Are you sure you want to delete that user?')); ?> </li>
<?php endif; ?>
<li><?php echo $this->Html->link('List Users', array('action' => 'index')); ?> </li>
<li><?php echo $this->Html->link('New User', array('action' => 'add')); ?> </li>
</ul>
Expand Down

0 comments on commit 22569b6

Please sign in to comment.