mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-08 16:14:26 +02:00
Make BaseApi->checkAllowedScope into an object method
- It isn't called from static contexts anymore
This commit is contained in:
parent
f70a64891c
commit
9e71610711
131 changed files with 152 additions and 152 deletions
|
@ -56,7 +56,7 @@ class Create extends BaseApi
|
|||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
|
|
|
@ -56,7 +56,7 @@ class Destroy extends BaseApi
|
|||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
|
|
|
@ -33,7 +33,7 @@ class Lists extends BaseApi
|
|||
{
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// This is a dummy endpoint
|
||||
|
|
|
@ -53,7 +53,7 @@ class Ownership extends BaseApi
|
|||
}
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
$circles = $this->dba->select('group', [], ['deleted' => false, 'uid' => $uid, 'cid' => null]);
|
||||
|
|
|
@ -58,7 +58,7 @@ class Statuses extends BaseApi
|
|||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_READ);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
if (empty($request['list_id'])) {
|
||||
|
|
|
@ -56,7 +56,7 @@ class Update extends BaseApi
|
|||
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
BaseApi::checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$this->checkAllowedScope(BaseApi::SCOPE_WRITE);
|
||||
$uid = BaseApi::getCurrentUserID();
|
||||
|
||||
// params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue