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

Don't submit owner via API on document upload #2777

Merged
merged 1 commit into from Mar 1, 2023

Conversation

jonaswinkler
Copy link
Member

@jonaswinkler jonaswinkler commented Feb 28, 2023

Proposed change

Don't allow owner to be submitted via API, instead use currently logged in user for the new document.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

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

Makes sense to me

@stumpylog stumpylog added the bug Bug report or a Bug-fix label Feb 28, 2023
@shamoon
Copy link
Member

shamoon commented Feb 28, 2023

Hmm, but wouldn’t we want to sometimes be able to set the owner to the post documents view?

Currently this does the same thing (uses the logged in user) just that it comes from the frontend.

Sorry if I’m misunderstanding

@jonaswinkler
Copy link
Member Author

It's more about user separation. You could use the API to add documents for another user, and I'd say that's a big no no.

@shamoon
Copy link
Member

shamoon commented Feb 28, 2023

Fair enough, it doesn’t feel that “dangerous” to give a doc to someone else but I can see how separation is cleaner

@jonaswinkler jonaswinkler merged commit 020abaf into dev Mar 1, 2023
@jonaswinkler jonaswinkler deleted the bugfix-owner-on-new-document branch March 1, 2023 00:08
@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants