fix: User cannot update profile when MembersCanDeleteAccount setting is disabled, closes #7729

This commit is contained in:
Tom Moor
2024-10-03 20:25:35 -04:00
parent 8356d44cae
commit 033b05f679

View File

@@ -23,9 +23,16 @@ allow(User, "inviteUser", Team, (actor, team) =>
)
);
allow(User, ["update", "delete", "readDetails"], User, (actor, user) =>
allow(User, ["update", "readDetails"], User, (actor, user) =>
or(
//
isTeamAdmin(actor, user),
actor.id === user?.id
)
);
allow(User, "delete", User, (actor, user) =>
or(
isTeamAdmin(actor, user),
and(
actor.id === user?.id,