Fix duplicate SCOPE_WRITE check

It's pretty clear from context this is intended to be SCOPE_FOLLOW. It's
been like this ever since it was introduced in revision 49207a8
This commit is contained in:
Ben Millwood 2024-12-28 02:40:56 +00:00 committed by Hypolite Petovan
parent c7c029a044
commit 442dcd1688

View file

@ -189,7 +189,7 @@ class OAuth
'created_at' => DateTimeFormat::utcNow()
];
foreach ([BaseApi::SCOPE_READ, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_PUSH] as $scope) {
foreach ([BaseApi::SCOPE_READ, BaseApi::SCOPE_WRITE, BaseApi::SCOPE_FOLLOW, BaseApi::SCOPE_PUSH] as $scope) {
if ($fields[$scope] && !$application[$scope]) {
Logger::warning('Requested token scope is not allowed for the application', ['token' => $fields, 'application' => $application]);
}