1. 07 3月, 2013 1 次提交
  2. 06 3月, 2013 3 次提交
  3. 05 3月, 2013 1 次提交
  4. 02 3月, 2013 2 次提交
  5. 28 2月, 2013 1 次提交
  6. 27 2月, 2013 3 次提交
  7. 20 2月, 2013 1 次提交
  8. 16 2月, 2013 1 次提交
    • S
      API: fixes visibility of project hook · e9d3b965
      Sebastian Ziebell 提交于
      When a user is not authorized to see the list of hooks for a project, he is
      still able to access the hooks separately. For example if access to
      `GET /projects/:id/hooks` fails and returns a `403 Unauthorized` error it is
      still possible to access a hook directly via `GET /projects/:id/hooks/:hook_id`.
      
      Fixes access, also added tests to check access and status codes of hooks.
      e9d3b965
  9. 14 2月, 2013 4 次提交
  10. 13 2月, 2013 4 次提交
    • S
      API: extracted helper method to provide 400 bad request error with description · 6fc3263e
      Sebastian Ziebell 提交于
      Extracted a method for 400 error (Bad request) and adjusted code accordingly. The name of
      the missing attribute is used to show which one was missing from the request. It is used to
      give an appropriate message in the json response.
      6fc3263e
    • S
    • S
      API: fixes a few return codes for project snippets · fd01f3aa
      Sebastian Ziebell 提交于
      When using project snippets via API the functions now provide status codes for
      different situations other then only returning 404 error. If required parameters are missing,
      e.g. `title` when creating a project snippet a 400 (Bad request) error is returned. The snippet
      delete function now is idempotent and returns a 200 (Ok) regardless if the snippet with the
      given id is available or not. Changing return codes of these functions has the advantage that
      the 404 error is used only for resources, which are not available.
      
      Tests added to check these status codes when handling project snippets.
      fd01f3aa
    • S
      API: changed status codes for project hooks functions · 7cc4339f
      Sebastian Ziebell 提交于
      Different status codes in the API lib are returned on hook creation, update or deletion.
      If a required parameter is not given (e.g. `url` in `/projects/:id/hooks/:hook_id`) status
      code 400 (Bad request) is returned. On hook deletion a 200 status code is returned, regardless if
      the hook is present or not. This makes the DELETE function an idempotent operation. Appropriate tests
      are added to check these status codes.
      7cc4339f
  11. 10 2月, 2013 1 次提交
  12. 09 2月, 2013 1 次提交
  13. 08 2月, 2013 2 次提交
    • S
      Adding a project hook returns status code 400 if url is not given · 9544f903
      Sebastian Ziebell 提交于
      When adding a project hook a url must be specified or a 400 error code is returned
      
      * Specs added to check status code on handling project hooks
      * refactored code, extracted a method
      9544f903
    • S
      API: refined status code handling when adding or updating a project member · 818caf0b
      Sebastian Ziebell 提交于
      When a user is added to a project that is already a member of, a status code 201 is now returned to
      signal an idempotent operation. If something fails then instead of returning error code 404 different
      more specific error codes are returned. Status code 400 (Bad request) is returned when a required
      attribute, e.g. `access_level` is not given or 422 if there is a semantic error, e.g. should
      the `access_level` have an unsupported value.
      
      Specs are added to check these status codes.
      818caf0b
  14. 01 2月, 2013 1 次提交
    • F
      Don't crash when removing a user that's not project member · ce6436b9
      Felix Gilcher 提交于
      The attempt to revoke project access for a user that was not member of the
      project results in a 500 Internal Server error where it actually should
      result in a 200 OK since after the operation, the user is not member of
      the project. This turns the operation into an idempotent call that can
      be repeated with no ill effects.
      
      Updated the spec and changed the code accordingly. However, the result differs
      slightly, as we can't return the users project access level if the user was not
      member. I'm not aware if anybody relies on the result of this call.
      
      Fixes #2832
      ce6436b9
  15. 31 1月, 2013 1 次提交
  16. 19 1月, 2013 1 次提交
  17. 17 1月, 2013 1 次提交
  18. 05 1月, 2013 1 次提交
  19. 03 1月, 2013 1 次提交
  20. 23 12月, 2012 1 次提交
  21. 22 12月, 2012 2 次提交
  22. 21 12月, 2012 1 次提交
  23. 24 11月, 2012 2 次提交
  24. 10 11月, 2012 1 次提交
  25. 12 10月, 2012 1 次提交
    • J
      Update lib/api/projects.rb · d1a18d03
      jozefvaclavik 提交于
      Added methods for listing one project hook and editing hooks.
      GET /project/:id/hooks/:hook_id
      PUT /project/:id/hooks/:hook_id
      d1a18d03
  26. 08 10月, 2012 1 次提交