saas issues fixed
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ SECRET_KEY="Usu9Qmg4ppRexR6Xp657MMMHsoOaiV8cPqlY_THWNaPhGT6DN9Xd8UO4zG3kWjwIqW9h
|
|||||||
ALLOWED_HOSTS=*
|
ALLOWED_HOSTS=*
|
||||||
HOST=127.0.0.1
|
HOST=127.0.0.1
|
||||||
FRONTEND_URL=http://localhost:3000
|
FRONTEND_URL=http://localhost:3000
|
||||||
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
|
CORS_ALLOWED_ORIGINS=http://localhost:5173,http://localhost:5174
|
||||||
|
|
||||||
# Security
|
# Security
|
||||||
ENCRYPTION_KEY="1cd1dc2d42afc5606e224df1108162db2d6ca372a45a9b8d278162f6006236d5"
|
ENCRYPTION_KEY="1cd1dc2d42afc5606e224df1108162db2d6ca372a45a9b8d278162f6006236d5"
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ class EnvironmentResponse(BaseModel):
|
|||||||
slug: str
|
slug: str
|
||||||
frontend_base_url: str
|
frontend_base_url: str
|
||||||
backend_base_url: str
|
backend_base_url: str
|
||||||
sso_entry_path: str
|
sso_entry_path: Optional[str] = "/sso/callback"
|
||||||
permission_sync_endpoint: str
|
permission_sync_endpoint: Optional[str] = "/internal/permissions"
|
||||||
sso_exchange_endpoint: Optional[str]
|
sso_exchange_endpoint: Optional[str]
|
||||||
provisioning_endpoint: Optional[str] = "/internal/tenants/provision"
|
provisioning_endpoint: Optional[str] = "/internal/tenants/provision"
|
||||||
trust_type: str
|
trust_type: str
|
||||||
|
|||||||
@@ -149,7 +149,11 @@ class ModulePermissionService:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def get_module_permissions(db: Session, module_id: str):
|
def get_module_permissions(db: Session, module_id: str):
|
||||||
"""List permissions for a module from local DB."""
|
"""List permissions for a module from local DB."""
|
||||||
module = db.query(Module).filter(Module.module_id == module_id).first()
|
try:
|
||||||
|
module_uuid = uuid.UUID(module_id)
|
||||||
|
module = db.query(Module).filter(Module.id == module_uuid).first()
|
||||||
|
except ValueError:
|
||||||
|
module = db.query(Module).filter(Module.module_id == module_id).first()
|
||||||
if not module:
|
if not module:
|
||||||
raise HTTPException(status_code=404, detail="Module not found")
|
raise HTTPException(status_code=404, detail="Module not found")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user