fix tests after last commit
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@678 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
41a29f49ee
commit
cae9f4de38
2 changed files with 5 additions and 1 deletions
|
@ -285,10 +285,13 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_DbService
|
||||||
|
|
||||||
$userservice = SemanticScuttle_Service_Factory::get('User');
|
$userservice = SemanticScuttle_Service_Factory::get('User');
|
||||||
$user = $userservice->getCurrentObjectUser();
|
$user = $userservice->getCurrentObjectUser();
|
||||||
|
if ($user === null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
//user has to be either admin, or owner
|
//user has to be either admin, or owner
|
||||||
if ($GLOBALS['adminsCanModifyBookmarksFromOtherUsers']
|
if ($GLOBALS['adminsCanModifyBookmarksFromOtherUsers']
|
||||||
&& $userservice->isAdmin($user)
|
&& $userservice->isAdmin($user->id)
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -407,6 +407,7 @@ class SemanticScuttle_Service_User extends SemanticScuttle_DbService
|
||||||
}
|
}
|
||||||
//reload user object
|
//reload user object
|
||||||
$this->getCurrentUser(true);
|
$this->getCurrentUser(true);
|
||||||
|
$this->getCurrentObjectUser(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue