sjyangkevin commented on code in PR #77138:
URL: https://github.com/apache/airflow/pull/77138#discussion_r4644154295
##########
providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py:
##########
@@ -626,9 +647,12 @@ def reset_password(self, userid: int, password: str) ->
bool:
user = self.get_user_by_id(userid)
if not user:
return False
- user.password = self._hash_password(password)
+ self.set_user_password(user, password)
self.reset_user_sessions(user)
- return self.update_user(user)
+ if not self.update_user(user):
+ return False
+ get_fab_auth_manager().cache.pop(user.id, None)
Review Comment:
The pop is now in `update_user`, right after the commit, and the separate
ones in `reset_password` and the users API are gone. Any change that goes
through `update_user`, including role changes, now applies on the next request
instead of waiting for the cache to expire.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]