Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EZEE-3453: Fixed admin user draft create during frontend login #162

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data/mysql/cleandata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14)
(34), (35), (36), (37);

INSERT INTO `ezuser` (`contentobject_id`, `email`, `login`, `password_hash`, `password_hash_type`)
VALUES (10,'[email protected]','anonymous','$2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC',7),
(14,'[email protected]','admin','$2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy',7);
VALUES (10,'[email protected]','anonymous','$2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC',7),
(14,'[email protected]','admin','$2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy',7);

INSERT INTO `ezuser_role` (`contentobject_id`, `id`, `limit_identifier`, `limit_value`, `role_id`)
VALUES (11,28,'','',1),
Expand Down
4 changes: 2 additions & 2 deletions data/postgresql/cleandata.sql
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11), (12), (13), (14)
(34), (35), (36), (37);

INSERT INTO "ezuser" ("contentobject_id", "email", "login", "password_hash", "password_hash_type")
VALUES (10,'[email protected]','anonymous','$2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC',7),
(14,'[email protected]','admin','$2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy',7);
VALUES (10,'[email protected]','anonymous','$2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC',7),
(14,'[email protected]','admin','$2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy',7);

INSERT INTO "ezuser_role" ("contentobject_id", "id", "limit_identifier", "limit_value", "role_id")
VALUES (11,28,'','',1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ public function getCriteriaForInitialData(): iterable
yield 'SectionIdentifier=standard' => new Criterion\SectionIdentifier('standard');
yield 'Sibling IN 2, 1]' => new Criterion\Sibling(2, 1);
yield 'Subtree=/1/2/' => new Criterion\Subtree('/1/2/');
yield 'UserEmail=[email protected]' => new Criterion\UserEmail('[email protected]');
yield 'UserEmail=nospam@*' => new Criterion\UserEmail('*@ez.no', Criterion\Operator::LIKE);
yield 'UserEmail=[email protected]' => new Criterion\UserEmail('[email protected]');
yield 'UserEmail=admin@*' => new Criterion\UserEmail('*@link.invalid', Criterion\Operator::LIKE);
yield 'UserId=14' => new Criterion\UserId(14);
yield 'UserLogin=admin' => new Criterion\UserLogin('admin');
yield 'UserLogin=a*' => new Criterion\UserLogin('a*', Criterion\Operator::LIKE);
Expand Down
6 changes: 3 additions & 3 deletions eZ/Publish/API/Repository/Tests/SearchServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,23 +753,23 @@ public function getContentQuerySearches()
],
[
[
'query' => new Criterion\UserEmail('*nospam*', Operator::LIKE),
'query' => new Criterion\UserEmail('*anonymous*', Operator::LIKE),
'sortClauses' => [new SortClause\ContentId()],
'limit' => 50,
],
$fixtureDir . 'UserEmail.php',
],
[
[
'query' => new Criterion\UserEmail('[email protected]', Operator::EQ),
'query' => new Criterion\UserEmail('[email protected]', Operator::EQ),
'sortClauses' => [new SortClause\ContentId()],
'limit' => 50,
],
$fixtureDir . 'UserEmail.php',
],
[
[
'query' => new Criterion\UserEmail(['[email protected]'], Operator::IN),
'query' => new Criterion\UserEmail(['[email protected]'], Operator::IN),
'sortClauses' => [new SortClause\ContentId()],
'limit' => 50,
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,8 @@ ezurlalias_ml_incr:
- { id: 41 }
ezurlwildcard: { }
ezuser:
- { contentobject_id: 10, email: [email protected], login: anonymous, password_hash: $2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC, password_hash_type: 7 }
- { contentobject_id: 14, email: [email protected], login: admin, password_hash: $2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy, password_hash_type: 7 }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this change affects integration tests in migration bundle. Please ping me if/when this change goes through.

- { contentobject_id: 10, email: [email protected], login: anonymous, password_hash: $2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC, password_hash_type: 7 }
- { contentobject_id: 14, email: [email protected], login: admin, password_hash: $2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy, password_hash_type: 7 }
ezuser_accountkey: { }
ezuser_role:
- { contentobject_id: 12, id: 25, limit_identifier: '', limit_value: '', role_id: 2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function providerForGetFieldData(): array
'hasStoredLogin' => true,
'contentId' => 10,
'login' => 'anonymous',
'email' => '[email protected]',
'email' => '[email protected]',
'passwordHash' => '$2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC',
'passwordHashType' => User::PASSWORD_HASH_PHP_DEFAULT,
'enabled' => true,
Expand All @@ -37,7 +37,7 @@ public function providerForGetFieldData(): array
'hasStoredLogin' => true,
'contentId' => 14,
'login' => 'admin',
'email' => '[email protected]',
'email' => '[email protected]',
'passwordHash' => '$2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy',
'passwordHashType' => User::PASSWORD_HASH_PHP_DEFAULT,
'enabled' => true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ezuser:
- { contentobject_id: 10, email: [email protected], login: anonymous, password_hash: $2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC, password_hash_type: 7 }
- { contentobject_id: 10, email: [email protected], login: anonymous, password_hash: $2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC, password_hash_type: 7 }
- { contentobject_id: 16, email: [email protected], login: test, password_hash: $2y$10$35gOSQs6JK4u4whyERaeUuVeQBi2TUBIZIfP7HEj7sfz.MxvTuOeC, password_hash_type: 5 }
- { contentobject_id: 14, email: [email protected], login: admin, password_hash: $2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy, password_hash_type: 7 }
- { contentobject_id: 14, email: [email protected], login: admin, password_hash: $2y$10$FDn9NPwzhq85cLLxfD5Wu.L3SL3Z/LNCvhkltJUV0wcJj7ciJg2oy, password_hash_type: 7 }
4 changes: 2 additions & 2 deletions eZ/Publish/Core/Persistence/Cache/Tests/UserHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function providerForCachedLoadMethods(): array
return [
['load', [14], 'ez-user-14', $user],
['loadByLogin', ['admin'], 'ez-user-admin-by-login', $user],
['loadByEmail', ['[email protected]'], 'ez-user-nospam_Aez.no-by-email', $user],
['loadUsersByEmail', ['[email protected]'], 'ez-users-nospam_Aez.no-by-email', [$user]],
['loadByEmail', ['[email protected]'], 'ez-user-admin_Alink.invalid-by-email', $user],
['loadUsersByEmail', ['[email protected]'], 'ez-users-admin_Alink.invalid-by-email', [$user]],
['loadUserByToken', ['hash'], 'ez-user-hash-by-account-key', $user],
['loadRole', [9], 'ez-role-9', $role],
['loadRoleByIdentifier', ['member'], 'ez-role-member-by-identifier', $role],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2660,7 +2660,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '333',
Expand Down Expand Up @@ -2784,7 +2784,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '345',
Expand Down Expand Up @@ -2908,7 +2908,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '357',
Expand Down Expand Up @@ -3107,7 +3107,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '376',
Expand Down Expand Up @@ -3231,7 +3231,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '388',
Expand Down Expand Up @@ -3355,7 +3355,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '400',
Expand Down Expand Up @@ -3674,7 +3674,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '433',
Expand Down Expand Up @@ -3798,7 +3798,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '445',
Expand Down Expand Up @@ -3922,7 +3922,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '457',
Expand Down Expand Up @@ -4706,7 +4706,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '531',
Expand Down Expand Up @@ -8614,7 +8614,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '893',
Expand Down Expand Up @@ -8738,7 +8738,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '905',
Expand Down Expand Up @@ -8937,7 +8937,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '924',
Expand Down Expand Up @@ -9061,7 +9061,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '936',
Expand Down Expand Up @@ -9185,7 +9185,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '948',
Expand Down Expand Up @@ -9459,7 +9459,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '974',
Expand Down Expand Up @@ -10904,7 +10904,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '1103',
Expand Down Expand Up @@ -11075,7 +11075,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '1119',
Expand Down Expand Up @@ -11575,7 +11575,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '1163',
Expand Down Expand Up @@ -12075,7 +12075,7 @@
'data_float' => '0',
'data_int' => null,
'data_text' => '<?xml version="1.0" encoding="utf-8"?>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
<ezauthor><authors><author id="0" name="Administrator User" email="[email protected]"/></authors></ezauthor>
',
'data_type_string' => 'ezauthor',
'id' => '1207',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ public function providerForLanguagesLookupMethods()
['loadSubUserGroups', [$userGroup, 50, 50, self::LANG_ARG], [$userGroup], 3],
['loadUser', [14, self::LANG_ARG], $user, 1],
['loadUserByLogin', ['admin', self::LANG_ARG], $user, 1],
['loadUserByEmail', ['[email protected]', self::LANG_ARG], $user, 1],
['loadUsersByEmail', ['[email protected]', self::LANG_ARG], [$user], 1],
['loadUserByEmail', ['[email protected]', self::LANG_ARG], $user, 1],
['loadUsersByEmail', ['[email protected]', self::LANG_ARG], [$user], 1],
['loadUserGroupsOfUser', [$user, 50, 50, self::LANG_ARG], [$userGroup], 3],
['loadUsersOfUserGroup', [$userGroup, 50, 50, self::LANG_ARG], [$user], 3],
['loadUserByToken', ['43ir43jrt43', self::LANG_ARG], $user, 1],
Expand Down
Loading