コード例 #1
0
 protected function internalFulfilled(kScope $scope)
 {
     $partner = PartnerPeer::retrieveByPK(kCurrentContext::$ks_partner_id);
     $roleIds = kPermissionManager::getRoleIds($partner, kCurrentContext::getCurrentKsKuser());
     $conditionRoleIds = array_map('trim', explode(',', $this->roleIds));
     if (!is_array($roleIds)) {
         $roleIds = array();
     }
     foreach ($roleIds as $roleId) {
         if (!in_array($roleId, $conditionRoleIds)) {
             return false;
         }
     }
     return true;
 }