/** * Determines whether the current user can view the content. * * @return bool */ public function canView() { //We make sure that the content has been instantiated and that the // user CMS permissions have been set. Then we read from the user's information. //The key to understanding permissions is the permissionsfrom flag in the // node table. That is set to a node which has permissions in the // cms_permissions table. Then the user has a set of permission information // in $vbulletin->userinfo['permissions']['cms']. The actual determination // is made in item_content, which knows the internals of this item. $this->assertContent(); if (!isset($vbulletin->userinfo['permissions']['cms'])) { vBCMS_Permissions::getUserPerms(); } return $this->content->canView(); }