Skip to content

Commit b267059

Browse files
committed
rename
1 parent 6c83310 commit b267059

File tree

4 files changed

+11
-53
lines changed

4 files changed

+11
-53
lines changed

packages/common-library/src/common_library/users_enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class UserStatus(str, Enum):
6060

6161

6262
class AccountRequestStatus(str, Enum):
63-
"""Status of an account request"""
63+
"""Status of the request for an account"""
6464

65-
PENDING = "PENDING"
66-
APPROVED = "APPROVED"
67-
REJECTED = "REJECTED"
65+
PENDING = "PENDING" # Pending PO review to approve/reject the request
66+
APPROVED = "APPROVED" # PO approved the request
67+
REJECTED = "REJECTED" # PO rejected the request

packages/models-library/src/models_library/api_schemas_webserver/users.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,13 @@ def from_domain_model(cls, data):
241241

242242

243243
class UsersForAdminListFilter(Filters):
244-
approved: Annotated[
245-
bool | None,
246-
Field(
247-
description="Filter users by approval status: True for approved, False for pending/rejected, None for all"
248-
),
249-
] = None
244+
# TODO: create a filter for two views that OM needs
245+
#
246+
# 1. States of an Account Resquest: PENDING, REJECTED, APPROVED
247+
# 2. If APPROVED AND user uses the invitation link, then it can be in any of these states:
248+
# CONFIRMATION_PENDING, ACTIVE, EXPIRED, BANNED, DELETED
249+
#
250+
approved: bool | None = None
250251

251252

252253
class UsersForAdminListQueryParams(PageQueryParameters, UsersForAdminListFilter): ...

packages/postgres-database/src/simcore_postgres_database/migration/versions/c2e3e38f115e_new_account_request_status_column.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

packages/postgres-database/src/simcore_postgres_database/models/users_details.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
sa.Enum(AccountRequestStatus),
6161
nullable=False,
6262
server_default=sa.text("'PENDING'::account_request_status"),
63-
doc="Status of the account request: PENDING, APPROVED, REJECTED",
6463
),
6564
# Billable address columns:
6665
sa.Column("institution", sa.String(), doc="the name of a company or university"),

0 commit comments

Comments
 (0)