Allow to specify operations that also need to be set.

When the edit operation is set, the read permission is now set too.
This commit is contained in:
Jan Böhmer 2019-09-11 13:37:51 +02:00
parent 55983102ed
commit ac302ab16a
7 changed files with 163 additions and 1 deletions

View file

@ -64,6 +64,7 @@ namespace App\Entity\UserSystem;
use App\Entity\Base\NamedDBElement;
use App\Security\Interfaces\HasPermissionsInterface;
use App\Validator\Constraints\Selectable;
use App\Validator\Constraints\ValidPermission;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
@ -163,6 +164,7 @@ class User extends NamedDBElement implements UserInterface, HasPermissionsInterf
/** @var PermissionsEmbed
* @ORM\Embedded(class="PermissionsEmbed", columnPrefix="perms_")
* @ValidPermission()
*/
protected $permissions;