mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 00:04:27 +02:00
Get rid of App->user completely
This commit is contained in:
parent
fc283ab928
commit
28090bd793
39 changed files with 158 additions and 234 deletions
|
@ -75,9 +75,7 @@ class BaseApi extends BaseModule
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
if (empty($a->getUserId()) || $a->getUserId() != self::getCurrentUserID()) {
|
||||
if (!DI::app()->isLoggedIn()) {
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
@ -86,9 +84,7 @@ class BaseApi extends BaseModule
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
if (empty($a->getUserId()) || $a->getUserId() != self::getCurrentUserID()) {
|
||||
if (!DI::app()->isLoggedIn()) {
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
@ -97,9 +93,7 @@ class BaseApi extends BaseModule
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
if (empty($a->getUserId()) || $a->getUserId() != self::getCurrentUserID()) {
|
||||
if (!DI::app()->isLoggedIn()) {
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
@ -108,9 +102,7 @@ class BaseApi extends BaseModule
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
$a = DI::app();
|
||||
|
||||
if (empty($a->getUserId()) || $a->getUserId() != self::getCurrentUserID()) {
|
||||
if (!DI::app()->isLoggedIn()) {
|
||||
throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue