Issue #2946882: Auth revoke on profile update
1 unresolved thread
Merge request reports
Activity
added 1 commit
This MR doesn't work.
willInvalidateAccessTokens
is alwaystrue
.Also
$roles_changed
returns an array @src/EntityUpdateHookHandler.php
L69=>
Shouldn't it be a bool for the event dispatcher to work as intended? Not a php expert but passing an empty array for a bool check on the event class seems wrong and I can't see an array length check nor how
haveAccessCharacteristicsChanged
is updated?$roles_changed = !empty(array_diff($roles_new, $roles_old)) || !empty(array_diff($roles_old, $roles_new)); $event = new UserUpdateTokenInvalidationEvent( $password_changed || $account_blocked || $roles_changed, $entity );
Edited by Abdul Sadik Yalcinadded 13 commits
-
3743aac0...72d19606 - 12 commits from branch
project:6.0.x
- 5a83f1d9 - Merge branch '6.0.x' of https://git.drupalcode.org/project/simple_oauth into...
-
3743aac0...72d19606 - 12 commits from branch
- tests/src/Unit/EntityUpdateHandlerTest.php 0 → 100644
80 * @covers ::entityUpdateHandler 81 */ 82 public function testEntityUpdateHandlerPasswordChange() { 83 $user = $this->prophesize(UserInterface::class); 84 $user->getRoles()->willReturn(['role1']); 85 $user->pass = (object) ['value' => 'new_password']; 86 $user->isActive()->willReturn(TRUE); 87 88 $user_original = $this->prophesize(UserInterface::class); 89 $user_original->getRoles()->willReturn(['role1']); 90 $user_original->pass = (object) ['value' => 'password']; 91 $user_original->isActive()->willReturn(TRUE); 92 $user->original = $user_original->reveal(); 93 94 $this->updateHandler->handleEntityUpdate($user->reveal()); 95 $this->expiredCollector->deleteMultipleTokens([])->shouldBeCalled(); added 16 commits
-
95259c27...4ce2bfb5 - 10 commits from branch
project:6.0.x
- 3799d314 - Issue #2946882: Auth revoke on profile update
- 080416a4 - Fix undefined property
- a378ad13 - Issue #2946882: Added removal of tokens when deleting users
- 0d8ea0bf - Added unit test and interfaces
- c7cc0895 - Some phpcs fixes
- 7e4457d1 - Process feedback
Toggle commit list-
95259c27...4ce2bfb5 - 10 commits from branch
Please register or sign in to reply