From: edward Date: Wed, 30 Mar 2016 10:57:35 +0000 (+0800) Subject: RooTrait.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b1a04e5bf73d68878c5f1a96d66a6fb51734810f RooTrait.php --- diff --git a/RooTrait.php b/RooTrait.php index 23973a61..e84ab797 100644 --- a/RooTrait.php +++ b/RooTrait.php @@ -164,8 +164,17 @@ trait Pman_Core_RooTrait { return false; } + function hasPerm($name, $lvl) // do we have a permission + { + static $pcache = array(); + $au = $this->getAuthUser(); + return $au && $au->hasPerm($name, $lvl); + + } + function getAuthUser() { die('Get auth user is not implement.'); } + }