Skip to content

Commit 68ead3c

Browse files
committed
chore: PR review
1 parent 8c71f40 commit 68ead3c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/Http/Utils/FilterAvailableSummitsStrategy.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* limitations under the License.
1313
**/
1414
use App\Security\SummitScopes;
15-
use Illuminate\Support\Facades\Config;
1615
use models\oauth2\IResourceServerContext;
1716
/**
1817
* Class FilterAvailableSummitsStrategy
@@ -30,4 +29,4 @@ static public function shouldReturnAllSummits(IResourceServerContext $resource_s
3029
$needed_scope = SummitScopes::ReadAllSummitData;
3130
return in_array($needed_scope, $scopes);
3231
}
33-
}
32+
}

app/Providers/AppServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,10 @@ public function register()
719719
{
720720

721721
if (!defined('SCOPE_BASE_REALM')) {
722-
define('SCOPE_BASE_REALM', config('app.scope_base_realm'));
722+
$scopeBaseRealm = rtrim((string) config('app.scope_base_realm', ''), '/');
723+
if ($scopeBaseRealm === '')
724+
throw new \RuntimeException('Missing required config: app.scope_base_realm');
725+
define('SCOPE_BASE_REALM', $scopeBaseRealm);
723726
}
724727

725728
App::singleton(IResourceServerContext::class, ResourceServerContext::class);

tests/ProtectedApiTestCase.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
use App\Models\Foundation\Main\IGroup;
2828
use App\Security\CompanyScopes;
2929
use App\Security\SponsoredProjectScope;
30-
use App\Security\GroupsScopes;
3130
use App\Security\TeamScopes;
3231
use Mockery;
3332
/**
@@ -226,7 +225,6 @@ public function get($token_value)
226225
SummitScopes::ReadSummitsConfirmExternalOrders,
227226
SummitScopes::WriteSummitsConfirmExternalOrders,
228227
SummitScopes::WriteVideoData,
229-
SummitScopes::WriteVideoData,
230228
SummitScopes::MeRead,
231229
SummitScopes::ReadNotifications,
232230
MemberScopes::ReadMemberData,

0 commit comments

Comments
 (0)