Compare commits

...

10 commits

Author SHA1 Message Date
Simon Vieille 63bc4cde1c Merge branch 'develop'
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/tag/woodpecker/2 Pipeline was successful
ci/woodpecker/tag/woodpecker/1 Pipeline was successful
2024-05-13 17:55:56 +02:00
Simon Vieille 2b43f97315
update changelog
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
2024-05-13 17:55:52 +02:00
Simon Vieille 10564e6d37
add new version of murph-npm 2024-05-13 17:54:29 +02:00
Simon Vieille ebbb4c01e0 Merge branch 'develop'
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/tag/woodpecker/1 Pipeline was successful
ci/woodpecker/tag/woodpecker/2 Pipeline was successful
2024-05-12 22:53:14 +02:00
Simon Vieille 43fb25d122
update changelog
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
2024-05-12 22:53:11 +02:00
Simon Vieille 4253985bc3
update murph 2024-05-12 22:52:13 +02:00
Simon Vieille 79d549254f Merge branch 'develop'
All checks were successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
2024-03-25 16:00:53 +01:00
Simon Vieille c79e96e291
apply consensus as access decision manager strategy
All checks were successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
2024-03-25 16:00:51 +01:00
Simon Vieille 092b490ae2 Merge branch 'develop'
Some checks failed
ci/woodpecker/push/woodpecker/1 Pipeline failed
ci/woodpecker/push/woodpecker/2 Pipeline was successful
2024-03-25 15:46:57 +01:00
Simon Vieille fcecf74f90
add default voter
Some checks failed
ci/woodpecker/push/woodpecker/2 Pipeline failed
ci/woodpecker/push/woodpecker/1 Pipeline failed
2024-03-25 15:46:53 +01:00
7 changed files with 2823 additions and 13429 deletions

View file

@ -1,5 +1,13 @@
## [Unreleased]
## [v1.25.1] - 2024-05-13
### Fixed
* fix murph-npm version
## [v1.25.0] - 2024-05-12
### Changed
* upgrade murph/murph-core
## [v1.23.0] - 2023-09-28
### Changed
* upgrade murph/murph-core

View file

@ -7,7 +7,7 @@
"prefer-stable": true,
"require": {
"php": ">=8.0.0",
"murph/murph-core": "^1.23"
"murph/murph-core": "^1.25"
},
"require-dev": {
"symfony/browser-kit": "^5.4",

View file

@ -3,6 +3,10 @@ security:
App\Entity\User:
algorithm: auto
access_decision_manager:
strategy: consensus
allow_if_all_abstain: false
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
enable_authenticator_manager: true
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords

11023
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,10 +2,17 @@
namespace App;
use App\Core\DependencyInjection\Compiler\BuilderBlockPass;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class Kernel extends BaseKernel
{
use MicroKernelTrait;
protected function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new BuilderBlockPass());
}
}

View file

@ -0,0 +1,51 @@
<?php
namespace App\Security\Voter;
use App\Core\Entity\EntityInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\User\UserInterface;
class EntityVoter extends Voter
{
public const EDIT = 'edit';
public const VIEW = 'show';
public const DELETE = 'delete';
protected function supports(string $attribute, mixed $subject): bool
{
// replace with your own logic
// https://symfony.com/doc/current/security/voters.html
return in_array($attribute, [self::EDIT, self::VIEW, self::DELETE])
&& $subject instanceof EntityInterface;
}
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();
if (!$user instanceof UserInterface) {
return false;
}
switch ($attribute) {
case self::EDIT:
return true;
break;
case self::VIEW:
return true;
break;
case self::DELETE:
return true;
break;
}
return false;
}
}

5157
yarn.lock

File diff suppressed because it is too large Load diff