Lines Matching refs:access_level
239 * @param int|null $access_level
243 public function canShow(int|null $access_level = null): bool argument
245 $access_level ??= Auth::accessLevel($this->tree);
249 if ($access_level === Auth::PRIV_HIDE) {
253 $cache_key = 'show-' . $this->xref . '-' . $this->tree->id() . '-' . $access_level;
255 …urn Registry::cache()->array()->remember($cache_key, fn () => $this->canShowRecord($access_level));
261 * @param int|null $access_level
265 public function canShowName(int|null $access_level = null): bool argument
267 return $this->canShow($access_level);
294 public function privatizeGedcom(int $access_level): string argument
296 if ($access_level === Auth::PRIV_HIDE) {
300 if (!$this->canShow($access_level)) {
310 foreach ($this->facts([], false, $access_level) as $fact) {
329 if ($record === null || !$record->canShow($access_level)) {
611 * @param int|null $access_level
619 int|null $access_level = null,
622 $access_level ??= Auth::accessLevel($this->tree);
628 if ($this->canShow($access_level)) {
630 … if (($filter === [] || in_array($fact->tag(), $filter, true)) && $fact->canShow($access_level)) {
972 * @param int $access_level
976 protected function canShowByType(int $access_level): bool argument
982 return $fact_privacy[static::RECORD_TYPE] >= $access_level;
1095 * @param int $access_level
1099 private function canShowRecord(int $access_level): bool argument
1107 …erPreference(Auth::user(), UserInterface::PREF_TREE_ACCOUNT_XREF) && $access_level === Auth::acces…
1118 return Auth::PRIV_NONE >= $access_level;
1121 return Auth::PRIV_USER >= $access_level;
1131 return $individual_privacy[$this->xref()] >= $access_level;
1135 if (Auth::PRIV_NONE >= $access_level) {
1140 return $this->canShowByType($access_level);