19declare(strict_types=1);
45 $this->
access = $access_handler;
50 $this->ws_tree = new \ilWorkspaceTree($this->
owner);
51 $this->posting_manager = $domain->
posting();
57 return $this->
access->checkAccess(
'write',
'', $this->node_id);
62 return $this->
access->checkAccess(
'read',
'', $this->node_id);
77 ?
int $a_author_id =
null
95 $post = new \ilBlogPosting($a_posting_id);
96 $a_author_id = $post->getAuthor();
98 return $this->user_id === $a_author_id;
105 if (!is_null($this->node_id)) {
106 return $this->
access->checkAccess($perm,
"", $this->node_id);
108 if ($this->
owner === $this->user_id) {
120 return ($this->checkPermissionBool(
"redact") ||
121 $this->checkPermissionBool(
"write"));
127 $this->postingIdMatches($posting_id) &&
128 $this->checkPermissionBool(
"read") &&
129 ($this->mayContribute() ||
130 $this->page_manager->lookupActive($posting_id,
"blp")));
135 if (!$this->postingIdMatches($posting_id)) {
138 return ($this->checkPermissionBool(
"redact") ||
139 $this->checkPermissionBool(
"write")
145 return $this->page_manager->lookupActive($posting_id,
"blp");
151 $obj_id = $this->ws_tree->lookupObjectId($this->node_id);
155 return $this->posting_manager->lookupBlogId($posting_id) === $obj_id;
160 return $this->access;
canApprove(int $posting_id)
ILIAS Blog Posting PostingManager $posting_manager
checkPermissionBool(string $perm)
canReadPosting(int $posting_id)
postingIdMatches(int $posting_id)
ilWorkspaceAccessHandler ilAccessHandler $access
__construct(InternalDomainService $domain, \ilWorkspaceAccessHandler|\ilAccessHandler $access_handler, ?int $node_id, int $id_type, int $user_id, int $owner)
PageManagerInterface $page_manager
mayEditPosting(int $a_posting_id, ?int $a_author_id=null)
isActive(int $posting_id)
canManage()
Check if user has admin access (approve, may edit & deactivate all postings)
New implementation of ilObjectGUI.
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Combines all available interfaces which can be called via global $ilAccess.
if(!file_exists('../ilias.ini.php'))