6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/22/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#5687] guest can't access tickets whups
*
Your Email Address
*
Spam protection
Enter the letters below:
._.. . .. ..__ | | | || |[ __ _|_|___|__||/\|[_./
Comment
>> In a bug report you should be as specific as possible. Just saying > >> PHP 5 is a tiny bit of information but largely useless. Please be > >> more specific. > >> > >> Put in a var_dump of $permission in the line before the fatal error, > >> see what it is. > > > > how can i put that var_dump??what is the code?i'm sorry my ability in > coding is not really good T_T.. this is the code: > > ------------------------------------------------------------------------------------------------- > > function getPermissions($permission, $user = null, $creator = null) > > { > > if (!is_a($permission, 'DataTreeObject_Permission')) { > > $permission = &$this->getPermission($permission); > > if (is_a($permission, 'PEAR_Error')) { > > Horde::logMessage($permission, __FILE__, __LINE__, > PEAR_LOG_DEBUG); > > return false; > > } > > } > > > > if (is_null($user)) { > > $user = Auth::getAuth(); > > > > } > > > > // If this is a guest user, only check guest permissions. > > if (empty($user)) { > > return $permission->getGuestPermissions(); > > > > } > > > > // If $creator was specified, check creator permissions. > > if (!is_null($creator)) { > > // If the user is the creator of the event see if there > > // are creator permissions. > > if (strlen($user) && $user === $creator && > > ($perms = $permission->getCreatorPermissions()) !== null) { > > return $perms; > > } > > } > > --------------------------------------------------------------------------------------------------- > > *****THIS IS THE ERROR PART****** > > // Check user-level permissions. > > --> $userperms = $permission->getUserPermissions(); > > if (isset($userperms[$user])) { > > return $userperms[$user]; > > } > > -------------------------------------------------------------------------------------------------- > > // If no user permissions are found, try group permissions. > > if (isset($permission->data['groups']) && > > is_array($permission->data['groups']) && > > count($permission->data['groups'])) { > > require_once 'Horde/Group.php'; > > $groups = &Group::singleton(); > > > > $composite_perm = null; > > $type = $permission->get('type'); > > foreach ($permission->data['groups'] as $group => $perm) { > > if ($groups->userIsInGroup($user, $group)) { > > if (is_null($composite_perm)) { > > $composite_perm = $type == 'matrix' ? 0 : array(); > > } > > if ($type == 'matrix') { > > $composite_perm |= $perm; > > } else { > > $composite_perm[] = $perm; > > } > > } > > } > > > > if ($composite_perm !== null) { > > return $composite_perm; > > } > > } > > > > // If there are default permissions, return them. > > // if (($perms = $permission->getDefaultPermissions()) !== null) { > > // return $perms; > > // } > > > > // Otherwise, deny all permissions to the object. > > return false; > > }
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers