Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
allowed tag
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Mar 22, 2017
1 parent fed21a0 commit c85fd2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source/views/elements/allowed.dark.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php #compile
$this->runtimeVariable('permission', '${permission}');
?><?php
/**
* @var string $permission
* @var \Spiral\Security\GuardInterface $guard
*/
$guard = spiral(\Spiral\Security\GuardInterface::class);
if ($guard->allows($permission)) {
ob_start(); ?>${context}<?php
echo ob_get_clean();
}
?>

0 comments on commit c85fd2c

Please sign in to comment.