Revision 4b3b8688 snf-cyclades-app/synnefo/api/util.py
b/snf-cyclades-app/synnefo/api/util.py | ||
---|---|---|
58 | 58 |
ItemNotFound, ServiceUnavailable, Unauthorized) |
59 | 59 |
from synnefo.db.models import (Flavor, VirtualMachine, VirtualMachineMetadata, |
60 | 60 |
Network, NetworkInterface) |
61 |
from synnefo.lib.astakos import get_user |
|
61 | 62 |
from synnefo.plankton.backend import ImageBackend |
62 | 63 |
|
63 | 64 |
|
... | ... | |
315 | 316 |
try: |
316 | 317 |
request.serialization = request_serialization(request, |
317 | 318 |
atom_allowed) |
318 |
if not request.user: |
|
319 |
get_user(request, settings.ASTAKOS_URL) |
|
320 |
if not request.user_uniq: |
|
319 | 321 |
raise Unauthorized('No user found.') |
320 | 322 |
if http_method and request.method != http_method: |
321 | 323 |
raise BadRequest('Method not allowed.') |
Also available in: Unified diff