remove unused role ROLE_CUSTOMER (#712)

This commit is contained in:
Kevin Papst
2019-04-19 18:42:25 +02:00
committed by GitHub
parent 48f3ad842d
commit 32b36f42f0
15 changed files with 1 additions and 48 deletions

View File

@@ -41,7 +41,6 @@ security:
allow_if_all_abstain: false
role_hierarchy:
ROLE_USER: ROLE_CUSTOMER
ROLE_TEAMLEAD: ROLE_USER
ROLE_ADMIN: ROLE_TEAMLEAD
ROLE_SUPER_ADMIN: ROLE_ADMIN

View File

@@ -153,10 +153,6 @@ class UserFixtures extends Fixture
protected function getUserDefinition()
{
return [
[
'Clara Haynes', 'CFO', 'clara_customer', 'clara_customer@example.com', User::ROLE_CUSTOMER,
'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=monsterid&f=y', true
],
[
'John Doe', 'Developer', self::USERNAME_USER, 'john_user@example.com', User::ROLE_USER,
self::DEFAULT_AVATAR, true

View File

@@ -30,7 +30,6 @@ use Symfony\Component\Validator\Constraints as Assert;
*/
class User extends BaseUser implements UserInterface
{
public const ROLE_CUSTOMER = 'ROLE_CUSTOMER';
public const ROLE_USER = 'ROLE_USER';
public const ROLE_TEAMLEAD = 'ROLE_TEAMLEAD';
public const ROLE_ADMIN = 'ROLE_ADMIN';

View File

@@ -14,16 +14,12 @@ use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
/**
* Class RoleValidator
*/
class RoleValidator extends ConstraintValidator
{
/**
* @var string[]
*/
protected $allowedRoles = [
User::ROLE_CUSTOMER,
User::ROLE_USER,
User::ROLE_TEAMLEAD,
User::ROLE_ADMIN,

View File

@@ -52,7 +52,7 @@ class UserTest extends AbstractEntityTest
{
return [
[str_pad('#', 3, '-'), 'test@x.x'], // shortest possible username
[str_pad('#', 60, '-'), 'test@x.x', ['ROLE_CUSTOMER']], // longest possible password and valid role
[str_pad('#', 60, '-'), 'test@x.x', ['ROLE_TEAMLEAD']], // longest possible password and valid role
];
}

View File

@@ -28,7 +28,6 @@ class RoleValidatorTest extends ConstraintValidatorTestCase
public function getValidRoles()
{
return [
[User::ROLE_CUSTOMER],
[User::ROLE_USER],
[User::ROLE_TEAMLEAD],
[User::ROLE_ADMIN],

View File

@@ -537,10 +537,6 @@
<source>ROLE_USER</source>
<target>المستخدم</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>زبون</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -604,10 +604,6 @@
<source>ROLE_USER</source>
<target>Benutzer</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Kunde</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -604,10 +604,6 @@
<source>ROLE_USER</source>
<target>User</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Customer</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -541,10 +541,6 @@
<source>ROLE_USER</source>
<target>Usuario</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Cliente</target>
</trans-unit>
<!--
Statistics

View File

@@ -542,10 +542,6 @@
<source>ROLE_USER</source>
<target>Usager</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Client</target>
</trans-unit>
<!--
Données statistiques pour le tableau de bord et les profils des usagers

View File

@@ -596,10 +596,6 @@
<source>ROLE_USER</source>
<target>Felhasználó</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Ügyfél</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -523,10 +523,6 @@
<source>ROLE_USER</source>
<target>Utente</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Cliente</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -558,10 +558,6 @@
<source>ROLE_USER</source>
<target>Usuário</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Cliente</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile

View File

@@ -533,10 +533,6 @@
<source>ROLE_USER</source>
<target>Пользователь</target>
</trans-unit>
<trans-unit id="ROLE_CUSTOMER">
<source>ROLE_CUSTOMER</source>
<target>Клиент</target>
</trans-unit>
<!--
Statistics data for Dashboard & Users profile