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

Add endpoints to lock and unlock a document #5107

Merged
merged 5 commits into from
Nov 6, 2019
Merged

Commits on Nov 4, 2019

  1. Add a lock endpoint

    Add an endpoint to the export api to allow the document import process
    to flag a document that's being imported as "locked" so that users are
    not permitted to make any changes to it.
    
    Ensures that only users with export data permissions can access this
    endpoint.
    leenagupte committed Nov 4, 2019
    Configuration menu
    Copy the full SHA
    0402297 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2019

  1. Lock document when lock endpoint is called

    A 204 No Content is returned if the lock request is successful.
    [Rails 5](rails/rails#19377) does this by
    default by automatically adding `:no_content` to the header if it can't
    find a template to respond with.
    leenagupte committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    b7ef898 View commit details
    Browse the repository at this point in the history
  2. Add an unlock endpoint

    Add an endpoint to the export api to allow the document import process
    to "unlock" a document that's being imported if the import has failed
    for any reason.
    
    Ensure that only users with export data permissions can access this
    endpoint.
    leenagupte committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    e8015bd View commit details
    Browse the repository at this point in the history
  3. Unlock document when the unlock endpoint is called

    A 204 No Content is returned if the unlock request is successful.
    [Rails 5](rails/rails#19377) does this by
    default by automatically adding `:no_content` to the header if it can't
    find a template to respond with.
    leenagupte committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    89153ad View commit details
    Browse the repository at this point in the history
  4. Skip verifying authenticity token

    Authenticity token are generated as a hidden field in Whitehall forms. As it is not intended for these
    POST routes to be called from a form within in the application, these check should be skipped.
    leenagupte committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    2bd2ad9 View commit details
    Browse the repository at this point in the history