From b1a04e5bf73d68878c5f1a96d66a6fb51734810f Mon Sep 17 00:00:00 2001 From: edward Date: Wed, 30 Mar 2016 18:57:35 +0800 Subject: [PATCH] RooTrait.php --- RooTrait.php | 9 +++++++++ 1 file changed, 9 insertions(+) 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.'); } + } -- 2.39.2