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

fix: private memos being public #2480

Merged
merged 10 commits into from Nov 4, 2023

Conversation

itschip
Copy link
Contributor

@itschip itschip commented Nov 3, 2023

  • fix(web/memo): filter out public option
  • feat(api/memo): sanity check for disabled public memos

Resolves #2462

Screenshot 2023-11-03 at 13 56 16 Screenshot 2023-11-03 at 13 58 00

Filter out the public option if we have disabled public memos
In case something goes wrong, we check the system setting on the backend in order to valdiate if we can create a public memo
@itschip itschip requested a review from boojack as a code owner November 3, 2023 12:06
@itschip
Copy link
Contributor Author

itschip commented Nov 3, 2023

We could also disable the select option. What do you like the best @boojack

Seems like a better option than removing it, as it looks werid if you are looking at a memo that is previously public
api/v1/memo.go Outdated Show resolved Hide resolved
@itschip
Copy link
Contributor Author

itschip commented Nov 3, 2023

@boojack We have access to the user role on the frontend, correct? (HOST?) If so, I'll just disable the public option if you're not an admin. Does that sound cool?

@boojack
Copy link
Collaborator

boojack commented Nov 3, 2023

@boojack We have access to the user role on the frontend, correct? (HOST?) If so, I'll just disable the public option if you're not an admin. Does that sound cool?

SGTM

@itschip itschip requested a review from boojack November 3, 2023 14:45
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, thanks for your contribution!

web/src/pages/MemoDetail.tsx Outdated Show resolved Hide resolved
@itschip itschip force-pushed the fix/private-memos-being-public branch from 1be4bf7 to ea3dfac Compare November 4, 2023 17:17
@boojack boojack changed the title fix/private memos being public fix: private memos being public Nov 4, 2023
@boojack boojack merged commit a62f1e1 into usememos:main Nov 4, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable public memos - not working
2 participants