aboutsummaryrefslogtreecommitdiffstats
path: root/moon_authz
diff options
context:
space:
mode:
Diffstat (limited to 'moon_authz')
-rw-r--r--moon_authz/moon_authz/api/authorization.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/moon_authz/moon_authz/api/authorization.py b/moon_authz/moon_authz/api/authorization.py
index ea177d81..e939604b 100644
--- a/moon_authz/moon_authz/api/authorization.py
+++ b/moon_authz/moon_authz/api/authorization.py
@@ -9,6 +9,7 @@ import logging
import flask
from flask import request
from flask_restful import Resource
+from python_moonutilities import exceptions
logger = logging.getLogger("moon.authz.api." + __name__)
@@ -86,6 +87,8 @@ class Authz(Resource):
scopes_list = list()
current_header_id = self.context.headers[self.context.index]
# Context.update_target(context)
+ if not self.context.pdp_set:
+ raise exceptions.PdpUnknown
current_pdp = self.context.pdp_set[current_header_id]
category_list = list()
category_list.extend(current_pdp["meta_rules"]["subject_categories"])