Skip to content

Commit f0aa945

Browse files
Merge branch 'master' into fix-pydantic-userwarnings
2 parents 3b708f0 + 638b592 commit f0aa945

File tree

15 files changed

+38
-22
lines changed

15 files changed

+38
-22
lines changed

.env-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ WEBSERVER_GARBAGE_COLLECTOR=null
371371
WEBSERVER_GROUPS=1
372372
WEBSERVER_GUNICORN_CMD_ARGS=--timeout=180
373373
WEBSERVER_HOST=webserver
374+
WEBSERVER_LICENSES=true
374375
WEBSERVER_LOGIN={}
375376
WEBSERVER_LOGLEVEL=INFO
376377
WEBSERVER_META_MODELING=1

api/specs/web-server/_licensed_items.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
from models_library.generics import Envelope
1515
from models_library.rest_error import EnvelopedError
1616
from simcore_service_webserver._meta import API_VTAG
17-
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
18-
from simcore_service_webserver.licenses._models import (
17+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
18+
_TO_HTTP_ERROR_MAP,
19+
)
20+
from simcore_service_webserver.licenses._common.models import (
1921
LicensedItemsBodyParams,
2022
LicensedItemsListQueryParams,
2123
LicensedItemsPathParams,

api/specs/web-server/_licensed_items_checkouts.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
from models_library.rest_error import EnvelopedError
1818
from models_library.rest_pagination import Page
1919
from simcore_service_webserver._meta import API_VTAG
20-
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
20+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
21+
_TO_HTTP_ERROR_MAP,
22+
)
2123
from simcore_service_webserver.licenses._licensed_items_checkouts_models import (
2224
LicensedItemCheckoutPathParams,
2325
LicensedItemsCheckoutsListQueryParams,

api/specs/web-server/_licensed_items_purchases.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
from models_library.rest_error import EnvelopedError
1818
from models_library.rest_pagination import Page
1919
from simcore_service_webserver._meta import API_VTAG
20-
from simcore_service_webserver.licenses._exceptions_handlers import _TO_HTTP_ERROR_MAP
21-
from simcore_service_webserver.licenses._models import (
20+
from simcore_service_webserver.licenses._common.exceptions_handlers import (
21+
_TO_HTTP_ERROR_MAP,
22+
)
23+
from simcore_service_webserver.licenses._common.models import (
2224
LicensedItemsPurchasesListQueryParams,
2325
LicensedItemsPurchasesPathParams,
2426
)

services/docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ services:
704704
INVITATIONS_SECRET_KEY: ${INVITATIONS_SECRET_KEY}
705705
INVITATIONS_USERNAME: ${INVITATIONS_USERNAME}
706706

707+
WEBSERVER_LICENSES: ${WEBSERVER_LICENSES}
708+
707709
WEBSERVER_LOGIN: ${WEBSERVER_LOGIN}
708710
LOGIN_ACCOUNT_DELETION_RETENTION_DAYS: ${LOGIN_ACCOUNT_DELETION_RETENTION_DAYS}
709711
LOGIN_REGISTRATION_CONFIRMATION_REQUIRED: ${LOGIN_REGISTRATION_CONFIRMATION_REQUIRED}
@@ -897,6 +899,7 @@ services:
897899
WEBSERVER_GARBAGE_COLLECTOR: ${WB_DB_EL_GARBAGE_COLLECTOR}
898900
WEBSERVER_GROUPS: ${WB_DB_EL_GROUPS}
899901
WEBSERVER_INVITATIONS: ${WB_DB_EL_INVITATIONS}
902+
WEBSERVER_LICENSES: 0
900903
WEBSERVER_LOGIN: ${WB_DB_EL_LOGIN}
901904
WEBSERVER_PAYMENTS: ${WB_DB_EL_PAYMENTS}
902905
WEBSERVER_META_MODELING: ${WB_DB_EL_META_MODELING}
@@ -1000,6 +1003,7 @@ services:
10001003
WEBSERVER_FRONTEND: ${WB_GC_FRONTEND}
10011004
WEBSERVER_GROUPS: ${WB_GC_GROUPS}
10021005
WEBSERVER_INVITATIONS: ${WB_GC_INVITATIONS}
1006+
WEBSERVER_LICENSES: 0
10031007
WEBSERVER_LOGIN: ${WB_GC_LOGIN}
10041008
WEBSERVER_META_MODELING: ${WB_GC_META_MODELING}
10051009
WEBSERVER_NOTIFICATIONS: ${WB_GC_NOTIFICATIONS}

services/web/server/src/simcore_service_webserver/application_settings.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
283283
WEBSERVER_DB_LISTENER: bool = True
284284
WEBSERVER_FOLDERS: bool = True
285285
WEBSERVER_GROUPS: bool = True
286-
WEBSERVER_LICENSES: bool = True
286+
WEBSERVER_LICENSES: bool = False
287287
WEBSERVER_META_MODELING: bool = True
288288
WEBSERVER_NOTIFICATIONS: bool = Field(default=True)
289289
WEBSERVER_PRODUCTS: bool = True
@@ -384,6 +384,7 @@ def _get_disabled_public_plugins(self) -> list[str]:
384384
public_plugin_candidates: Final = {
385385
"WEBSERVER_EXPORTER",
386386
"WEBSERVER_FOLDERS",
387+
"WEBSERVER_LICENSES",
387388
"WEBSERVER_META_MODELING",
388389
"WEBSERVER_PAYMENTS",
389390
"WEBSERVER_SCICRUNCH",
@@ -451,16 +452,17 @@ def to_client_statics(self) -> dict[str, Any]:
451452
"SIMCORE_VCS_RELEASE_TAG": True,
452453
"SIMCORE_VCS_RELEASE_URL": True,
453454
"SWARM_STACK_NAME": True,
455+
"WEBSERVER_LICENSES": True,
456+
"WEBSERVER_LOGIN": {
457+
"LOGIN_ACCOUNT_DELETION_RETENTION_DAYS",
458+
"LOGIN_2FA_REQUIRED",
459+
},
454460
"WEBSERVER_PROJECTS": {
455461
"PROJECTS_MAX_NUM_RUNNING_DYNAMIC_NODES",
456462
},
457463
"WEBSERVER_TRASH": {
458464
"TRASH_RETENTION_DAYS",
459465
},
460-
"WEBSERVER_LOGIN": {
461-
"LOGIN_ACCOUNT_DELETION_RETENTION_DAYS",
462-
"LOGIN_2FA_REQUIRED",
463-
},
464466
"WEBSERVER_SESSION": {"SESSION_COOKIE_MAX_AGE"},
465467
},
466468
exclude_none=True,

services/web/server/src/simcore_service_webserver/licenses/_common/__init__.py

Whitespace-only changes.

services/web/server/src/simcore_service_webserver/licenses/_exceptions_handlers.py renamed to services/web/server/src/simcore_service_webserver/licenses/_common/exceptions_handlers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from servicelib.aiohttp import status
44
from simcore_service_webserver.wallets.errors import WalletAccessForbiddenError
55

6-
from ..exception_handling import (
6+
from ...exception_handling import (
77
ExceptionToHttpErrorMap,
88
HttpErrorInfo,
99
exception_handling_decorator,
1010
to_exceptions_handlers_map,
1111
)
12-
from ..wallets.errors import WalletNotEnoughCreditsError
13-
from .errors import LicensedItemNotFoundError, LicensedItemPricingPlanMatchError
12+
from ...wallets.errors import WalletNotEnoughCreditsError
13+
from ..errors import LicensedItemNotFoundError, LicensedItemPricingPlanMatchError
1414

1515
_logger = logging.getLogger(__name__)
1616

services/web/server/src/simcore_service_webserver/licenses/_models.py renamed to services/web/server/src/simcore_service_webserver/licenses/_common/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from pydantic import BaseModel, ConfigDict, Field
1919
from servicelib.request_keys import RQT_USERID_KEY
2020

21-
from .._constants import RQ_PRODUCT_KEY
21+
from ..._constants import RQ_PRODUCT_KEY
2222

2323
_logger = logging.getLogger(__name__)
2424

services/web/server/src/simcore_service_webserver/licenses/_licensed_items_checkouts_rest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
from ..utils_aiohttp import envelope_json_response
2222
from ..wallets._handlers import WalletsPathParams
2323
from . import _licensed_items_checkouts_service
24-
from ._exceptions_handlers import handle_plugin_requests_exceptions
24+
from ._common.exceptions_handlers import handle_plugin_requests_exceptions
25+
from ._common.models import LicensedItemsRequestContext
2526
from ._licensed_items_checkouts_models import (
2627
LicensedItemCheckoutGet,
2728
LicensedItemCheckoutGetPage,
2829
LicensedItemCheckoutPathParams,
2930
LicensedItemsCheckoutsListQueryParams,
3031
)
31-
from ._models import LicensedItemsRequestContext
3232

3333
_logger = logging.getLogger(__name__)
3434

0 commit comments

Comments
 (0)