19 declare(strict_types=1);
45 $this->dic = $dic ??
$DIC;
50 if (!isset($this->access_cache[
'repo_read'])) {
52 if ($is_user_logged_in) {
53 $this->access_cache[
'repo_read'] = $this->dic->access()->checkAccess(
59 $this->access_cache[
'repo_read'] = $this->dic->settings()->get(
'pub_section') && $this->dic->access(
70 return $this->access_cache[
'repo_read'];
76 if (!isset($this->access_cache[
'repo_visible'])) {
78 if ($is_user_logged_in) {
79 $this->access_cache[
'repo_visible'] = $this->dic->access()->checkAccess(
85 $this->access_cache[
'repo_visible'] = $this->dic->settings()->get(
'pub_section') && $this->dic->access(
96 return $this->access_cache[
'repo_visible'];
102 if (!isset($this->access_cache[
'is_anonymous'])) {
103 $this->access_cache[
'is_anonymous'] = ($this->dic->user()->isAnonymous() || $this->dic->user()->getId(
108 return !$this->access_cache[
'is_anonymous'];
114 if (!isset($this->access_cache[
'has_admin_access'])) {
115 $this->access_cache[
'has_admin_access'] = ($this->dic->rbac()->system()->checkAccess(
121 return $this->access_cache[
'has_admin_access'];
138 if (!$r->hasReturnType() || !$r->getReturnType()->isBuiltin()) {
147 return static function () use ($closure,
$additional):
bool {
checkClosureForBoolReturnValue(Closure $c)
Class BasicAccessCheckClosures.
isUserLoggedIn(?Closure $additional=null)
Customizing of pimple-DIC for ILIAS.
__construct(?Container $dic=null)
BasicAccessCheckClosuresSingleton constructor.
hasAdministrationAccess(?Closure $additional=null)
getClosureWithOptinalClosure(Closure $closure, ?Closure $additional=null)
isRepositoryVisible(?Closure $additional=null)
isRepositoryReadable(?Closure $additional=null)