Revision b7e79bf3 snf-cyclades-app/synnefo/api/subnets.py
b/snf-cyclades-app/synnefo/api/subnets.py | ||
---|---|---|
164 | 164 |
def get_subnet(request, sub_id): |
165 | 165 |
"""Show info of a specific subnet""" |
166 | 166 |
user_id = request.user_uniq |
167 |
subnet = subnets.get_subnet(sub_id, prefetch_related=True)
|
|
167 |
subnet = subnets.get_subnet(sub_id) |
|
168 | 168 |
|
169 | 169 |
if (subnet.network.userid != user_id) and (subnet.network.public is False): |
170 | 170 |
raise api.faults.Unauthorized("You're not allowed to view this subnet") |
Also available in: Unified diff