Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MyPresenter.php
- ----------
- /**
- * Handle action, only valid for a logged-in user otherwise throws
- * @User
- */
- public function handleLike($itemId) { ... }
- page.latte without auth testing
- ----------
- <a n:href="like! $item->id">Like</a>
- Task:
- You want to hide the link, if the user is not authorized to perform such signal/action. How would you do that?
- What would happen, if you decide to change the rules for signal handler (e.g. only allowed for users with an editor role)?
Advertisement
Add Comment
Please, Sign In to add comment