Skip to content

Commit b401811

Browse files
committed
Remove mention in UI/tests
1 parent 213bc1b commit b401811

File tree

11 files changed

+7
-46
lines changed

11 files changed

+7
-46
lines changed

webapp/src/Controller/API/AccessController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ public function getStatusAction(Request $request): Access
222222
'team',
223223
'roles',
224224
'userid',
225-
'email',
226225
'last_ip',
227226
'enabled',
228227
]

webapp/src/Controller/Jury/UserController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public function indexAction(): Response
6464
'username' => ['title' => 'username', 'sort' => true, 'default_sort' => true],
6565
'externalid' => ['title' => 'external ID', 'sort' => true],
6666
'name' => ['title' => 'name', 'sort' => true],
67-
'email' => ['title' => 'email', 'sort' => true],
6867
'user_roles' => ['title' => 'roles', 'sort' => true],
6968
'teamid' => ['title' => '', 'sort' => false, 'render' => 'entity_id_badge'],
7069
'team' => ['title' => 'team', 'sort' => true],

webapp/src/DataTransferObject/AddUser.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ class AddUser
1414
public function __construct(
1515
public readonly string $username,
1616
public readonly string $name,
17-
#[OA\Property(format: 'email', nullable: true)]
18-
public readonly ?string $email,
1917
#[OA\Property(nullable: true)]
2018
public readonly ?string $ip,
2119
#[OA\Property(format: 'password', nullable: true)]

webapp/src/DataTransferObject/UpdateUser.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ public function __construct(
1111
public readonly string $id,
1212
string $username,
1313
string $name,
14-
?string $email,
1514
?string $ip,
1615
?string $password,
1716
?bool $enabled,
1817
?string $teamId,
1918
array $roles
2019
) {
21-
parent::__construct($username, $name, $email, $ip, $password, $enabled, $teamId, $roles);
20+
parent::__construct($username, $name, $ip, $password, $enabled, $teamId, $roles);
2221
}
2322
}

webapp/src/Form/Type/UserRegistrationType.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Symfony\Component\DependencyInjection\Attribute\Autowire;
1616
use Symfony\Component\Form\AbstractType;
1717
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
18-
use Symfony\Component\Form\Extension\Core\Type\EmailType;
1918
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
2019
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
2120
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
@@ -27,7 +26,6 @@
2726
use Symfony\Component\Intl\Countries;
2827
use Symfony\Component\OptionsResolver\OptionsResolver;
2928
use Symfony\Component\Validator\Constraints\Callback;
30-
use Symfony\Component\Validator\Constraints\Email;
3129
use Symfony\Component\Validator\Constraints\NotBlank;
3230
use Symfony\Component\Validator\Context\ExecutionContext;
3331

@@ -59,15 +57,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5957
'autocomplete' => 'name',
6058
],
6159
])
62-
->add('email', EmailType::class, [
63-
'label' => false,
64-
'required' => false,
65-
'attr' => [
66-
'placeholder' => 'Email address (optional)',
67-
'autocomplete' => 'email',
68-
],
69-
'constraints' => new Email(),
70-
])
7160
->add('teamName', TextType::class, [
7261
'label' => false,
7362
'attr' => [

webapp/src/Form/Type/UserType.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
1111
use Symfony\Component\DependencyInjection\Attribute\Autowire;
1212
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
13-
use Symfony\Component\Form\Extension\Core\Type\EmailType;
1413
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
1514
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
1615
use Symfony\Component\Form\Extension\Core\Type\TextType;
@@ -53,12 +52,6 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
5352
'help' => 'Optional full name for the user.',
5453
'empty_data' => ''
5554
]);
56-
$builder->add('email', EmailType::class, [
57-
'required' => false,
58-
'attr' => [
59-
'autocomplete' => 'user-email',
60-
],
61-
]);
6255
$builder->add('plainPassword', PasswordType::class, [
6356
'required' => false,
6457
'label' => 'Password',

webapp/templates/jury/user.html.twig

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@
2828
<th>Login</th>
2929
<td class="teamid">{{ user.username }}</td>
3030
</tr>
31-
<tr>
32-
<th>Email</th>
33-
<td>
34-
{% if user.email %}
35-
<a href="mailto:{{ user.email }}">{{ user.email }}</a>
36-
{% else %}
37-
-
38-
{% endif %}
39-
</td>
40-
</tr>
4131
<tr>
4232
<th>Password</th>
4333
<td>

webapp/tests/Unit/Controller/API/GeneralInfoControllerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testUserEndpoint(string $username, string $fullname, string $tea
110110
static::assertTrue($response['enabled']);
111111
static::assertNull($response['last_login_time']);
112112
static::assertGreaterThanOrEqual($response['first_login_time'], $response['last_api_login_time']);
113-
$keysExpected = ['id', 'ip', 'last_ip', 'email'];
113+
$keysExpected = ['id', 'ip', 'last_ip'];
114114
foreach ($keysExpected as $keyExpected) {
115115
static::assertArrayHasKey($keyExpected, $response);
116116
}

webapp/tests/Unit/Controller/API/UserControllerTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class UserControllerTest extends AccountBaseTestCase
1818
"id" => "admin",
1919
"username" => "admin",
2020
"name" => "Administrator",
21-
"email" => null,
2221
"ip" => null,
2322
"enabled" => true
2423
],
@@ -30,7 +29,6 @@ class UserControllerTest extends AccountBaseTestCase
3029
"id" => "judgehost",
3130
"username" => "judgehost",
3231
"name" => "User for judgedaemons",
33-
"email" => null,
3432
"ip" => null,
3533
"enabled" => true
3634
],
@@ -42,7 +40,6 @@ class UserControllerTest extends AccountBaseTestCase
4240
"id" => "demo",
4341
"username" => "demo",
4442
"name" => "demo user for example team",
45-
"email" => null,
4643
"ip" => null,
4744
"enabled" => true
4845
],

webapp/tests/Unit/Controller/Jury/UserControllerTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,16 @@ class UserControllerTest extends JuryControllerTestCase
2020
protected static string $className = User::class;
2121
protected static array $DOM_elements = ['h1' => ['Users']];
2222
protected static string $addForm = 'user[';
23-
protected static array $addEntitiesShown = ['name', 'username', 'email'];
23+
protected static array $addEntitiesShown = ['name', 'username'];
2424
protected static array $overviewSingleNotShown = ['plainPassword'];
2525
protected static array $addEntities = [['username' => 'un',
2626
'name' => 'Alice',
27-
'email' => '[email protected]',
2827
'plainPassword' => 'plainpassword',
2928
'ipAddress' => '10.0.0.0',
3029
'enabled' => '1',
3130
'team' => '0',
3231
'user_roles' => ['0' => true, '1' => true]],
3332
['username' => 'ABCabc123_-@', 'name' => 'Allowed username'],
34-
['username' => 'nem', 'name' => 'No Email',
35-
'email' => ''],
3633
['username' => 'npw', 'name' => 'No password',
3734
'plainPassword' => ''],
3835
['username' => 'specialchar', 'name' => 'Special char in password',

0 commit comments

Comments
 (0)