4 require_once(
'./Services/WebAccessChecker/interfaces/interface.ilWACCheckingClass.php');
20 if (strpos($ilWACPath->
getPath(),
'..') !==
false) {
24 if (!preg_match(
'@ilBadge\/(\d+\/)*?badge(tmpl)?_(\d+)\/@ui', $ilWACPath->
getPath())) {
34 $has_global_badge_administration_access = (
36 $DIC->rbac()->system()->checkAccessOfUser($DIC->user()->getId(),
'read', $admin_ref_id)
39 if (preg_match(
'@\/badgetmpl_(\d+)\/@ui', $ilWACPath->
getPath())) {
41 return $has_global_badge_administration_access;
44 if (preg_match(
'@\/badge_(\d+)\/@ui', $ilWACPath->
getPath(), $matches)) {
45 if ($has_global_badge_administration_access) {
49 $badge_id = (int) $matches[1];
64 bool $has_global_badge_administration_access
67 $badge =
new ilBadge($badge_id);
68 if ($badge->getParentId() > 0) {
73 if (!$badge_handler->isObjectActive((
int) $badge->getParentId())) {
78 if (!($context_ref_id > 0)) {
82 $context_ref_id = (int) $context_ref_id;
83 if ($DIC->repositoryTree()->isGrandChild((
int)
SYSTEM_FOLDER_ID, $context_ref_id)) {
84 $has_access = $has_global_badge_administration_access;
86 $has_access = $DIC->access()->checkAccessOfUser(
87 $DIC->user()->getId(),
101 foreach ($badges_of_user as $user_badge) {
102 if ((
int) $user_badge->getBadgeId() === $badge_id) {
114 foreach ($assignments as $assignment) {
115 if (!$assignment->getPosition()) {
124 $profile_visibility = $user->getPref(
'public_profile');
125 if ($profile_visibility ===
'g' || ($profile_visibility ===
'y' && !$DIC->user()->isAnonymous())) {
Class ChatMainBarProvider .
hasAccessToBadgeParentIdNode(\ILIAS\DI\Container $DIC, int $badge_id, bool $has_global_badge_administration_access)
static _getObjectsByType($a_obj_type="", $a_owner="")
Get objects by type.
isAssignedBadge(\ILIAS\DI\Container $DIC, int $badge_id)
static _getAllReferences($a_id)
get all reference ids of object
isAssignedBadgeOfPublishedUserProfile(\ILIAS\DI\Container $DIC, int $badge_id)
Class ilWACCheckingClass.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
canBeDelivered(ilWACPath $ilWACPath)
static getInstancesByBadgeId($a_badge_id)
static getInstancesByUserId($a_user_id)
static getInstance()
Constructor.