Source of file ScopeService.php
Size: 0,459 Bytes - Last Modified: 2022-02-21T10:00:46+00:00
/var/www/docs.ssmods.com/process/src/src/Services/ScopeService.php
1234567891011121314151617181920212223 | <?php namespace AdvancedLearning\Oauth2Server\Services; use SilverStripe\Security\Member; class ScopeService { /** * Checks whether the member has the specified scope. * * @param string $name * @param Member $member * * @return bool */ public function hasScope(string $name, Member $member): bool { return $member->Groups()->filter([ 'Scopes.Name' => $name ])->count() > 0; } } |