* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* fix(chalice): fixed Math-operators validation
refactor(chalice): search for sessions that have events for heatmaps

* refactor(chalice): search for sessions that have at least 1 location event for heatmaps

* feat(chalice): autocomplete return top 10 with stats

* fix(chalice): fixed autocomplete top 10 meta-filters

* fix(chalice): fixed change password to include spto-jwt & refresh tokens
This commit is contained in:
Kraiem Taha Yassine 2024-09-06 16:42:31 +02:00 committed by GitHub
parent 3dd31dc0a7
commit 527cf46130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 10 deletions

View file

@ -443,7 +443,12 @@ def change_password(tenant_id, user_id, email, old_password, new_password):
r = authenticate(user['email'], new_password)
return {
'jwt': r.pop('jwt')
"jwt": r.pop("jwt"),
"refreshToken": r.pop("refreshToken"),
"refreshTokenMaxAge": r.pop("refreshTokenMaxAge"),
"spotJwt": r.pop("spotJwt"),
"spotRefreshToken": r.pop("spotRefreshToken"),
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge")
}

View file

@ -764,14 +764,6 @@ def generate_new_user_token(context: schemas.CurrentContext = Depends(OR_context
return {"data": users.generate_new_api_key(user_id=context.user_id)}
@app.post('/account/password', tags=["account"])
def change_client_password(data: schemas.EditUserPasswordSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):
return users.change_password(email=context.email, old_password=data.old_password.get_secret_value(),
new_password=data.new_password.get_secret_value(), tenant_id=context.tenant_id,
user_id=context.user_id)
@app.post('/{projectId}/saved_search', tags=["savedSearch"])
def add_saved_search(projectId: int, data: schemas.SavedSearchSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):

View file

@ -148,6 +148,16 @@ def change_scope(data: schemas.ScopeSchema = Body(),
return {'data': data}
@app.post('/account/password', tags=["account"])
def change_client_password(resqponse: JSONResponse, data: schemas.EditUserPasswordSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):
r = users.change_password(email=context.email, old_password=data.old_password.get_secret_value(),
new_password=data.new_password.get_secret_value(), tenant_id=context.tenant_id,
user_id=context.user_id)
r = __process_authentication_response(response=resqponse, data=r)
return r
@app.post('/integrations/slack', tags=['integrations'])
@app.put('/integrations/slack', tags=['integrations'])
def add_slack_integration(data: schemas.AddCollaborationSchema,

View file

@ -525,7 +525,12 @@ def change_password(tenant_id, user_id, email, old_password, new_password):
r = authenticate(user['email'], new_password)
return {
'jwt': r.pop('jwt')
"jwt": r.pop("jwt"),
"refreshToken": r.pop("refreshToken"),
"refreshTokenMaxAge": r.pop("refreshTokenMaxAge"),
"spotJwt": r.pop("spotJwt"),
"spotRefreshToken": r.pop("spotRefreshToken"),
"spotRefreshTokenMaxAge": r.pop("spotRefreshTokenMaxAge")
}

View file

@ -153,6 +153,16 @@ def change_scope(data: schemas.ScopeSchema = Body(),
return {'data': data}
@app.post('/account/password', tags=["account"])
def change_client_password(resqponse: JSONResponse, data: schemas.EditUserPasswordSchema = Body(...),
context: schemas.CurrentContext = Depends(OR_context)):
r = users.change_password(email=context.email, old_password=data.old_password.get_secret_value(),
new_password=data.new_password.get_secret_value(), tenant_id=context.tenant_id,
user_id=context.user_id)
r = __process_authentication_response(response=resqponse, data=r)
return r
@app.post('/integrations/slack', tags=['integrations'])
@app.put('/integrations/slack', tags=['integrations'])
def add_slack_integration(data: schemas.AddCollaborationSchema,