Skip to content

Instantly share code, notes, and snippets.

@navarr
Created July 31, 2014 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navarr/daba188f93101f67e1ba to your computer and use it in GitHub Desktop.
Save navarr/daba188f93101f67e1ba to your computer and use it in GitHub Desktop.
<?php
namespace app\rbac;
use yii\rbac\Item;
use yii\rbac\Rule;
class CanGoToHell extends Rule
{
/**
* Executes the rule.
*
* @param Item $item the auth item that this rule is associated with
* @param array $params parameters passed to [[ManagerInterface::allow()]].
* @return boolean a value indicating whether the rule permits the auth item it is associated with.
*/
public function execute($item, $params)
{
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment