fix: owner should not be marked as shared when host is shared to their role #492
Reference in New Issue
Block a user
Delete Branch "fix/admin-share-permission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
isSharedflag logic to exclude host ownersRoot cause: The SQL query
hostAccess.id IS NOT NULLmarked hosts as "shared" whenever a hostAccess record existed, without checking if the current user is the owner.Scenario:
hostAccessrecord exists →isShared = trueFix: Add owner check to SQL:
hostAccess.id IS NOT NULL AND sshData.userId != userIdRelated to #391