1. 31 Mar, 2014 2 commits
  2. 20 Jan, 2014 1 commit
  3. 03 Dec, 2013 1 commit
  4. 28 Nov, 2013 2 commits
  5. 27 Nov, 2013 1 commit
  6. 21 Nov, 2013 1 commit
    • Christos Stavrakakis's avatar
      cyclades: Export Cyclades detailed stats from API · 2566bfd7
      Christos Stavrakakis authored
      Add '/admin/stats/detail' API endpoint to export basic statistics about
      Cyclades. Access to this view is only allowed to the users that belong
      to specific Astakos groups, as specified in the new setting
      'ADMIN_STATS_PERMITTED_GROUPS.' Also, added the new 'user_in_groups' API
      view decorator to snf_django that can be used for such checks.
      2566bfd7
  7. 29 Oct, 2013 2 commits
  8. 01 Oct, 2013 1 commit
    • Christos Stavrakakis's avatar
      Request Django=>1.4, <1.5 · f8082d99
      Christos Stavrakakis authored
      Drop support for Django 1.2. Remove compatibility code that were used in
      order to support Django 1.2 and 1.4. Finally update django documentation
      link in the docs.
      f8082d99
  9. 24 Sep, 2013 1 commit
  10. 16 Sep, 2013 1 commit
  11. 05 Aug, 2013 1 commit
  12. 28 Jun, 2013 1 commit
  13. 26 Jun, 2013 1 commit
  14. 25 Jun, 2013 2 commits
  15. 19 Jun, 2013 1 commit
  16. 18 Jun, 2013 1 commit
  17. 13 Jun, 2013 1 commit
  18. 12 Jun, 2013 1 commit
  19. 10 Jun, 2013 1 commit
    • Sofia Papagiannaki's avatar
      snf_django: Optionally use other default serialization than json · 51f608ed
      Sofia Papagiannaki authored
      Pithos api default serialization for listing is text insted of json.
      However the common api decorator if not specified otherwise used to
      json as the default serialization.
      So we introduced a new optional argument (defaults to json) to override
      the default serialization for the api method.
      
      Conflicts:
      	snf-pithos-app/pithos/api/util.py
      51f608ed
  20. 06 Jun, 2013 2 commits
  21. 03 Jun, 2013 1 commit
    • Georgios D. Tsoukalas's avatar
      make synnefo URLs consistent and configurable · 79f2ca3b
      Georgios D. Tsoukalas authored
      https://service.deployment.vendor.tld/service-base/api-prefix/hard/path
      |___________________________________| |__________| |________| |_______|
                   BASE_HOST                  BASE_PATH    PREFIX    Hardcoded
      |_________________________________________________|
                   SERVICE_BASE_URL
      
      - Introduce <SERVICE>_BASE_URL setting, and <API>_PREFIX constants
        for all services. Extract BASE_HOST, BASE_PATH from the setting.
      
      - Use settings and constants to construct top-level patterns
        (base-path/api-prefix) in services' urls.py
      
      - Refactor/extend proxy() to be compatible with the above.
      
      - Change URLs passed around (ui, e-mails) to be compatible.
        (needs more work)
      
      Notes:
      
      This configuration REQUIRES that any rewriting and proxying on the
      front-end must eventually result in the application server (gunicorn)
      getting the original path of the request, otherwise the view-generated
      URLs will be different.
      
      Changes:
      - set top-level urlpatterns from <SERVICE>_BASE_URL
      - rename setting: APP_INSTALL_URL to CYCLADES_BASE_URL
      - rename setting: ASTAKOS_URL to ASTAKOS_BASE_URL everywhere
      - introduce setting: PITHOS_BASE_URL
      - update shipped .confs, quick install admin guide, upgrade guide
      - fix urls/views/reverse()/other that were broken
      - (more not listed)
      79f2ca3b
  22. 31 May, 2013 1 commit
  23. 28 May, 2013 1 commit
  24. 20 May, 2013 1 commit
  25. 16 May, 2013 1 commit
    • Sofia Papagiannaki's avatar
      astakos: api calls authenticated via X-Auth-Token shall not affect cookie · d350c42a
      Sofia Papagiannaki authored
      CookieAuthenticationMiddleware.process_request() synchronizes
      the astakos cookie with the request user.
      If an astakos cookie is set but there is no logged in user,
      the middleware deletes the cookie.
      Respectively, if there is a logged in user but the astakos cookie
      is not set, the middleware setis the cookie.
      In order to set/delete the cookie, redirects to the request path.
      
      For checking whether the user is logged in or not,
      utilized the django.contrib.auth.models.User.is_authenticated() method.
      This returns always True for django.contrib.auth.models.User instances
      (request.user for non authenticated requests is
       django.contrib.auth.models.AnonymousUser instance)
      
      Some astakos api calls are decorated by
      astakos.api.utils.user_for_token()
      which checks the X-Auth-Token request header and if its valid
      sets the request.user to the respective AstakosUser instance.
      
      Therefore, the above check succeeded for these calls
      and the middleware used to set the cookie.
      Subsequent requests read the cookie and
      if it did not comform with the request.user
      (no authentication info supplied)
      redirected to request path for deleting it.
      
      In order to resolve this undesired behavior
      the cookie fix() method has been changed
      and if it is actually an api call request
      it returns immediately without affecting the cookie.
      d350c42a
  26. 30 Apr, 2013 2 commits
  27. 16 Apr, 2013 1 commit
    • Christos Stavrakakis's avatar
      Fix API decorator response Content-Type · 3b538afa
      Christos Stavrakakis authored
      Remove check for response Content-Type, since 'django.http.HttpResponse'
      has always a default Content-Type of 'text/html; charset=utf-8'. Views
      defining their response 'Content-Type' should set the
      'override_serialization' attribute of response to 'True'.
      3b538afa
  28. 15 Apr, 2013 1 commit
  29. 10 Apr, 2013 2 commits
  30. 08 Apr, 2013 1 commit
    • Christos Stavrakakis's avatar
      Implement single decorator for handling API calls · ee570a7a
      Christos Stavrakakis authored
      Create a single decorator for API methods to be used be accross all
      synnefo. This decorator does the following:
      
      * Proper logging of 5xx faults and unexpected errors
      * Authentication with Astakos using snf-astakos-client
      * Sets proper HTTP response and cache control headers
      
      Also move some common functions from various apps to
      'snf_django.lib.api.utils'
      
      Refs #3358 #3448
      ee570a7a