Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Crystal-SDS/controller into dev
Browse files Browse the repository at this point in the history
Conflicts:
	api/policies/views.py
  • Loading branch information
JosepSampe committed Oct 31, 2017
2 parents 8fead17 + 4d7de57 commit 3ffec77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/policies/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,13 @@ def access_control_detail(request, policy_id):
r.hdel("acl:" + str(target_id), acl_id)
except DataError:
return JSONResponse("Error retrieving policy", status=400)

return JSONResponse("Access policy correctly removed", status=status.HTTP_200_OK)

if request.method == 'PUT':
data = JSONParser().parse(request)
try:

policy_redis = r.hget("acl:" + str(target_id), acl_id)
policy = json.loads(policy_redis)
policy.update(data)
Expand Down

0 comments on commit 3ffec77

Please sign in to comment.