Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
/ api Public archive
  • Sponsor
  • Notifications You must be signed in to change notification settings
  • Fork 7

Add hard limit of unnapproved submissions per e-mail #17

Closed
josepostiga opened this issue Mar 28, 2020 · 5 comments · Fixed by #21
Closed

Add hard limit of unnapproved submissions per e-mail #17

josepostiga opened this issue Mar 28, 2020 · 5 comments · Fixed by #21
Labels
enhancement Small increment or feature request

Comments

@josepostiga
Copy link
Member

Currently, there's no hard limit to how many Link resource submission a given e-mail can do. This makes room for the possibility of a given email to spam our system with unnecessary and unwanted submissions.

We need to avoid that situation.

Definition of Done

Add a check upon a Link submission that uses the given user_email property and avoids that more than 5 unapproved Link resources are submitted, associated with that e-mail address.

@josepostiga josepostiga added the enhancement Small increment or feature request label Mar 28, 2020
@ghost
Copy link

ghost commented Sep 24, 2020

Hi @josepostiga.

Is this still needed?
Asking cause it's opened since march...but if so, I'll give it a go!

@josepostiga
Copy link
Member Author

Hi @tiago-sb. Yes, this is still a nice enhancement to add to the project.

@ghost
Copy link

ghost commented Sep 25, 2020

Couple of questions:

  1. In the DoD you mention user_email - do you mean author_email from Link class?
  2. Do you have a definition for the response to be sent when this limit is exceeded?
    Maybe HTTP 429 ?
    ... any payload?

@ghost
Copy link

ghost commented Sep 25, 2020

PR #21 opened.
Throwing an error on "Store test coverage report" but I don't think it is related to any change I made.....or is it ??

@josepostiga
Copy link
Member Author

josepostiga commented Sep 27, 2020

Couple of questions:

  1. In the DoD you mention user_email - do you mean author_email from Link class?
  2. Do you have a definition for the response to be sent when this limit is exceeded?
    Maybe HTTP 429 ?
    ... any payload?

I noticed that you've already opened the PR, and thanks (again) for that.

I'll just leave the answers to your questions, anyway, for future reference:

  1. Yes, I do. Sorry for the confusion.
  2. Yes, I think HTTP status code 429 is a nice one to use here.

@josepostiga josepostiga linked a pull request Sep 27, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Small increment or feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant