Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in checking user permissions for guest #35

Open
ghost opened this issue Mar 2, 2011 · 0 comments
Open

Bug in checking user permissions for guest #35

ghost opened this issue Mar 2, 2011 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 2, 2011

Hi.
It's been driving me crazy for about 4 hours now, but I think I've solved it.
When one tries to check permissions for an unauthenticated user (guest), a wrong assertion that $user['User']['user_group_id'] is set causes the process to fail, creating a weird query like:
...UserGroupPermission.user_group_id = OR...
I've managed to patch it by further editing (your edited) authsome.php (line 57):
from:
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
to:
/* NITZ DID IT*/
if(isset($user['User']))
return $userModel->UserGroup->isUserGroupAccess($user['User']['user_group_id'],$access);
else return $userModel->UserGroup->isUserGroupAccess(3,$access);

to make it use 3 (guest account) as the account type, when there's no account to be found.
I'd try to fix it myself in the source code, but it'd be rude and I'm real new to git (signed up to make this comment)
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants