fix: don't show posts from private profiles when quoted

fix: password updating (mod)
This commit is contained in:
trisua 2025-05-15 23:59:26 -04:00
parent 2ec56809b8
commit 03b252937b
8 changed files with 87 additions and 36 deletions

View file

@ -133,12 +133,13 @@ pub async fn update_user_password_request(
None => return Json(Error::NotAllowed.into()),
};
if user.id != id && !user.permissions.check(FinePermission::MANAGE_USERS) {
let can_force = user.permissions.check(FinePermission::MANAGE_USERS);
if user.id != id && !can_force {
return Json(Error::NotAllowed.into());
}
match data
.update_user_password(id, req.from, req.to, user, false)
.update_user_password(id, req.from, req.to, user, can_force)
.await
{
Ok(_) => Json(ApiReturn {