Commit e963eb0a authored by Jacob Priddy's avatar Jacob Priddy 👌

Allow admin user to use /me route to update password/doorcode/display name

parent 4a7b6b90
Pipeline #12452 passed with stages
in 3 minutes and 7 seconds
......@@ -44,8 +44,6 @@ class UpdateCurrentUser implements UpdateUserUseCase
*/
public function update(string $userId, array $attributes, Presenter $presenter): void
{
$this->authorizer->protectAdminRights($userId);
$user = $this->users->get($userId);
if (!$user) {
......
......@@ -94,7 +94,6 @@ class CurrentUserUpdateUseCaseTest extends TestCase
$this->assertFalse($this->response->hasError());
$this->assertEquals('gary is a menace', $this->usersRepository->get('69')->getDisplayName());
$this->assertEquals(HashedSearchable::hash('', '123456789012'), $this->usersRepository->get('69')->getDoorcode());
$this->assertTrue($this->authorizer->adminRightsWereProtected());
}
/**
......@@ -152,7 +151,6 @@ class CurrentUserUpdateUseCaseTest extends TestCase
$this->assertFalse($this->response->hasError());
$this->assertEquals($user, $this->response->getUser());
$this->assertTrue($this->authorizer->adminRightsWereProtected());
}
/**
......@@ -195,6 +193,5 @@ class CurrentUserUpdateUseCaseTest extends TestCase
$this->assertFalse($this->response->hasError());
$this->assertEquals(HashedSearchable::hash('', 'emplid1234'), $this->usersRepository->get('69')->getDoorcode());
$this->assertTrue($this->authorizer->adminRightsWereProtected());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment