Skip to content

Conversation

@danielkweon
Copy link
Contributor

fix [properties-be] - allow view access for publicly shared entities

  • Added fallback permission check in check_entity_view_permission - when get_users_access_level_v2 returns no access, we now check if the entity is publicly shared via SharePermission.isPublic
  • Uses existing macro_db_client::share_permission::get::get_*_share_permission functions to determine public visibility

When get_users_access_level_v2 returns no access, fall back to checking
if the entity is publicly shared via SharePermission.isPublic.

This fixes the issue where users couldn't view properties on publicly
shared documents because the permission check was too strict.
@danielkweon danielkweon self-assigned this Dec 4, 2025
@danielkweon danielkweon requested a review from a team as a code owner December 4, 2025 00:42
@linear
Copy link

linear bot commented Dec 4, 2025

Copy link
Member

@whutchinson98 whutchinson98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get_users_access_level_v2 should be returning correct access level even if the item is public and not explicitly shared with you via channels.

All of our access middleware uses these calls and works as expected so not sure why you are having this bug.

…ties

- Use initialize_user_context + attach_user middleware on properties router
- Add ensure_user_exists middleware to authenticated routes only
- GET entity properties allows anonymous access for public entities
@danielkweon danielkweon merged commit 7e4e852 into main Dec 4, 2025
34 checks passed
@danielkweon danielkweon deleted the daniel/m-5242-fix-properties-be-view-only-entity-properties branch December 4, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants