1000 search results

39 lines | app/config/security.yml
// ... lines 1 - 2
security:
// ... lines 4 - 6
role_hierarchy:
ROLE_ADMIN: [ROLE_MANAGE_GENUS]
// ... lines 9 - 39
See Code Block in Script
40 lines | app/config/security.yml
// ... lines 1 - 2
security:
// ... lines 4 - 14
firewalls:
// ... lines 16 - 20
main:
anonymous: ~
guard:
authenticators:
- app.security.login_form_authenticator
// ... lines 26 - 40
See Code Block in Script
32 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
main:
// ... lines 11 - 20
guard:
authenticators:
- 'jwt_token_authenticator'
// ... lines 24 - 32
See Code Block in Script
32 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
main:
pattern: ^/
anonymous: true
form_login:
# The route name that the login form submits to
check_path: security_login_check
login_path: security_login_form
logout:
# The route name the user can go to in order to logout
path: security_logout
guard:
authenticators:
- 'jwt_token_authenticator'
// ... lines 24 - 32
See Code Block in Script
32 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
main:
// ... lines 11 - 12
form_login:
# The route name that the login form submits to
check_path: security_login_check
login_path: security_login_form
// ... lines 17 - 32
See Code Block in Script
36 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
api:
pattern: ^/api/
// ... lines 12 - 36
See Code Block in Script
36 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
api:
pattern: ^/api/
anonymous: true
stateless: true
// ... lines 14 - 36
See Code Block in Script
36 lines | app/config/security.yml
security:
// ... lines 2 - 8
firewalls:
api:
pattern: ^/api/
anonymous: true
stateless: true
guard:
authenticators:
- 'jwt_token_authenticator'
main:
pattern: ^/
anonymous: true
form_login:
# The route name that the login form submits to
check_path: security_login_check
login_path: security_login_form
logout:
# The route name the user can go to in order to logout
path: security_logout
// ... lines 28 - 36
See Code Block in Script
31 lines | app/config/security.yml
// ... lines 1 - 2
security:
// ... lines 4 - 5
providers:
my_entity_users:
entity:
class: AppBundle:User
// ... lines 10 - 31
See Code Block in Script
31 lines | app/config/security.yml
// ... lines 1 - 2
security:
// ... lines 4 - 10
firewalls:
// ... lines 12 - 16
main:
anonymous: ~
// ... lines 19 - 21
guard:
authenticators:
- weird_authenticator
// ... lines 25 - 31
See Code Block in Script
32 lines | src/Security/Voter/SuperAdminVoter.php
// ... lines 1 - 9
final class SuperAdminVoter extends Voter
{
private const EXCLUSIONS = [
// ... lines 13 - 18
'CAN_IMPERSONATE',
// ... lines 20 - 32
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
// ... lines 13 - 16
protected function supports(string $attribute, mixed $subject): bool
{
return 'CAN_IMPERSONATE' === $attribute && $subject instanceof User;
}
// ... lines 21 - 40
}
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
// ... lines 13 - 21
/**
* @param User $subject
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
// ... lines 26 - 40
}
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
// ... lines 13 - 24
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
{
if (!$currentUser = $token->getUser()) {
return false;
}
// ... lines 30 - 39
}
}
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
// ... lines 13 - 24
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
{
// ... lines 27 - 30
if ($currentUser->getUserIdentifier() === $subject->getUserIdentifier()) {
return false;
}
// ... lines 34 - 39
}
}
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
// ... lines 13 - 24
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
{
// ... lines 27 - 34
if (in_array('ROLE_SUPER_ADMIN', $token->getRoleNames(), true)) {
return true;
}
// ... lines 38 - 39
}
}
See Code Block in Script
42 lines | src/Security/Voter/ImpersonationVoter.php
// ... lines 1 - 10
final class ImpersonationVoter extends Voter
{
public function __construct(private Security $security)
{
}
// ... lines 16 - 40
}
See Code Block in Script
21 lines | src/Security/Voter/SuperAdminVoter.php
// ... lines 1 - 8
final class SuperAdminVoter extends Voter
{
protected function supports(string $attribute, mixed $subject): bool
{
return true;
}
// ... lines 15 - 19
}
See Code Block in Script
21 lines | src/Security/Voter/SuperAdminVoter.php
// ... lines 1 - 8
final class SuperAdminVoter extends Voter
{
// ... lines 11 - 15
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool
{
return in_array('ROLE_SUPER_ADMIN', $token->getRoleNames(), true);
}
}
See Code Block in Script
31 lines | src/Security/Voter/SuperAdminVoter.php
// ... lines 1 - 9
final class SuperAdminVoter extends Voter
{
private const EXCLUSIONS = [
AuthenticatedVoter::IS_AUTHENTICATED,
AuthenticatedVoter::IS_AUTHENTICATED_FULLY,
AuthenticatedVoter::IS_AUTHENTICATED_REMEMBERED,
AuthenticatedVoter::IS_IMPERSONATOR,
AuthenticatedVoter::IS_REMEMBERED,
AuthenticatedVoter::PUBLIC_ACCESS,
];
// ... lines 20 - 29
}
See Code Block in Script