Added scope check

This commit is contained in:
Michael 2021-05-16 07:37:11 +00:00
commit 49207a8624
53 changed files with 107 additions and 62 deletions

View file

@ -55,7 +55,7 @@
use Friendica\Database\DBA;
if (!defined('DB_UPDATE_VERSION')) {
define('DB_UPDATE_VERSION', 1417);
define('DB_UPDATE_VERSION', 1418);
}
return [
@ -439,6 +439,7 @@ return [
"read" => ["type" => "boolean", "comment" => "Read scope"],
"write" => ["type" => "boolean", "comment" => "Write scope"],
"follow" => ["type" => "boolean", "comment" => "Follow scope"],
"push" => ["type" => "boolean", "comment" => "Push scope"],
],
"indexes" => [
"PRIMARY" => ["id"],
@ -457,6 +458,7 @@ return [
"read" => ["type" => "boolean", "comment" => "Read scope"],
"write" => ["type" => "boolean", "comment" => "Write scope"],
"follow" => ["type" => "boolean", "comment" => "Follow scope"],
"push" => ["type" => "boolean", "comment" => "Push scope"],
],
"indexes" => [
"PRIMARY" => ["application-id", "uid"],

View file

@ -53,6 +53,7 @@
"read" => ["application-token", "read"],
"write" => ["application-token", "write"],
"follow" => ["application-token", "follow"],
"push" => ["application-token", "push"],
],
"query" => "FROM `application-token`
INNER JOIN `application` ON `application-token`.`application-id` = `application`.`id`"