mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Implemented standart rights for user sources
This commit is contained in:
@@ -9,6 +9,7 @@ use Infinito\Domain\RequestManagement\Entity\RequestedEntityServiceInterface;
|
||||
use Infinito\Exception\NotCorrectInstanceException;
|
||||
use Infinito\DBAL\Types\Meta\Right\LayerType;
|
||||
use Infinito\Domain\LayerManagement\LayerInterfaceMap;
|
||||
use FOS\UserBundle\Model\UserInterface;
|
||||
|
||||
/**
|
||||
* This class is not ready and not tested!
|
||||
@@ -123,6 +124,12 @@ final class EntityDomService implements EntityDomServiceInterface
|
||||
$domElement->setAttribute('id', $value->getId());
|
||||
$domElement->setAttribute('name', LayerType::getReadableValue($layer));
|
||||
|
||||
return;
|
||||
}
|
||||
if ($value instanceof UserInterface) {
|
||||
$domElement->setAttribute('value', $value->getId());
|
||||
$domElement->setAttribute('name', 'user');
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Infinito\Domain\UserManagement;
|
||||
|
||||
use Infinito\DBAL\Types\Meta\Right\LayerType;
|
||||
use Infinito\DBAL\Types\ActionType;
|
||||
|
||||
/**
|
||||
* Containes the standart map.
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface UserSourceStandartRightMapInterface
|
||||
{
|
||||
const LAYER_RIGHT_MAP = [
|
||||
LayerType::SOURCE => [
|
||||
ActionType::READ,
|
||||
ActionType::UPDATE,
|
||||
],
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user