...Человеческий поиск в разработке...
- Модуль: vote
- Путь к файлу: ~/bitrix/modules/vote/lib/attachment/blogpostconnector.php
- Класс: BitrixVoteAttachmentBlogPostConnector
- Вызов: BlogPostConnector::getPermission
private function getPermission($userId) { global $APPLICATION; if (!Loader::includeModule('socialnetwork')) return false; elseif ( $APPLICATION->getGroupRight("blog") >= "W" || CSocNetUser::isCurrentUserModuleAdmin() ) { self::$permissions[$this->entityId] = BLOG_PERMS_FULL; } else if (!array_key_exists($this->entityId, self::$permissions)) { self::$permissions[$this->entityId] = BLOG_PERMS_DENY; $post = self::getPostData($this->entityId); if ($post && $post["ID"] > 0) { $p = CBlogPost::getSocNetPostPerms($this->entityId, true, $userId, $post["AUTHOR_ID"]); if ($p > BLOG_PERMS_MODERATE || ($p >= BLOG_PERMS_WRITE && $post["AUTHOR_ID"] == $userId)) $p = BLOG_PERMS_FULL; self::$permissions[$this->entityId] = $p; } } return self::$permissions[$this->entityId]; }