Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: resource visibility #1777

Merged
merged 4 commits into from
May 30, 2023
Merged

Conversation

athurg
Copy link
Contributor

@athurg athurg commented May 30, 2023

Check the resource visibility while get it by

  • /r/:resourceId/:publicId/:filename
  • /r/:resourceId/:publicId

Resource do not have a visibility attribute, its visibility is depend on the memos it attaches to:

  • If no memos attached, the resource is PRIVATE
  • If any memo of attached is PUBLIC, the resource is PUBLIC
  • If any memo of attached is PROTECTED, the resource is PROTECTED
  • If all memo of attached is PRIVATE, the resource is PRIVATE

PS:

  • PUBLIC means visible for anyone, include anonymous.
  • PROTECTED means visible for all logged user
  • PRIVATE means visible only for user who created the memo.

This PR also fix #1361 #1595 .

@athurg athurg requested a review from boojack as a code owner May 30, 2023 06:40
@github-actions
Copy link

github-actions bot commented May 30, 2023

Uffizzi Preview deployment-26977 was deleted.

Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM

@boojack boojack merged commit 25ce36e into usememos:main May 30, 2023
@athurg athurg deleted the feat_resource_visibility branch May 30, 2023 11:02
@athurg athurg added enhancement New feature or request backend labels May 30, 2023
@athurg athurg self-assigned this May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visible to anyone who gets the link
2 participants