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

Convert import to REST style POST #75

Closed
10 of 11 tasks
bonzini opened this issue Apr 27, 2018 · 1 comment
Closed
10 of 11 tasks

Convert import to REST style POST #75

bonzini opened this issue Apr 27, 2018 · 1 comment

Comments

@bonzini
Copy link
Contributor

bonzini commented Apr 27, 2018

  • Change models to use JSONField
  • Write a custom serializer for senders and recipients
  • Change "mbox" to use getters and setters instead of SerializerMethodField
    • Rename the existing "mbox" field to e.g. "mbox_blob" and add getters for "mbox" to api.models.Message
  • Add Create mixin to ProjectMessageSerializer
    • Add "create" method to MessageManager so that it calls save_mbox()
  • Add text/plain support to ProjectMessageSerializer's create (POST) action
    • Write converter from mbox to REST-style message JSON
  • Add more testcases around authorization: check for 403 on unauthenticated post, check what the "importer" group is allowed to do, etc.
  • Add /api/v1/messages (with POST support only)
    • For "importer" users: The message is added for all recognized projects
    • For other users: The message is added for all projects that are recognized and maintained by the user.
  • Refinements
    • For admin users the message is added for all recognized projects
    • Create MboxMessage from self.request.data rather than self.request.data['mbox']
@bonzini bonzini mentioned this issue Apr 27, 2018
14 tasks
@bonzini
Copy link
Contributor Author

bonzini commented Jul 27, 2018

Opening a separate issue for the last task.

@bonzini bonzini closed this as completed Jul 27, 2018
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

No branches or pull requests

1 participant