mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-07 06:25:21 +02:00
fix: allow admin users to delete other household recipes (#5767)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
This commit is contained in:
parent
bd0aed06ce
commit
5f522b5324
6 changed files with 128 additions and 12 deletions
7
tests/fixtures/fixture_users.py
vendored
7
tests/fixtures/fixture_users.py
vendored
|
@ -226,6 +226,13 @@ def unique_user(session: Session, api_client: TestClient):
|
|||
yield from _unique_user(session, api_client)
|
||||
|
||||
|
||||
@fixture(scope="module")
|
||||
def unique_admin(session: Session, api_client: TestClient, unique_user: utils.TestUser):
|
||||
admin_user = next(_unique_user(session, api_client))
|
||||
admin_user.repos.users.patch(admin_user.user_id, {"admin": True, "group_id": unique_user.group_id})
|
||||
yield admin_user
|
||||
|
||||
|
||||
@fixture(scope="module")
|
||||
def user_tuple(session: Session, admin_token, api_client: TestClient) -> Generator[list[utils.TestUser], None, None]:
|
||||
group_name = utils.random_string()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue