Commit 7fffd81a authored by John Red Medrano's avatar John Red Medrano

Merge pull request #30 in RMS/api-main-service from red-develop to dev

* commit 'c2fb895d':
  removed checking permission at utils
parents c1a1116f c2fb895d
...@@ -102,10 +102,10 @@ class Helper: ...@@ -102,10 +102,10 @@ class Helper:
'Authorization': request.META['HTTP_AUTHORIZATION'], 'Authorization': request.META['HTTP_AUTHORIZATION'],
'Content-Type': 'application/json', 'Content-Type': 'application/json',
"endpoint": str(endpoint.id) "endpoint": str(endpoint.id)
# "user": str(endpoint.name),
} }
req = requests.post(VALIDATE_TOKEN_URL, req = requests.post(VALIDATE_TOKEN_URL,
headers=self._headers) headers=self._headers)
print(req)
all_headers = {**req.headers, **self._headers} all_headers = {**req.headers, **self._headers}
if req.status_code == 200: if req.status_code == 200:
......
...@@ -68,6 +68,10 @@ class ApplicationViewSet(viewsets.ModelViewSet): ...@@ -68,6 +68,10 @@ class ApplicationViewSet(viewsets.ModelViewSet):
results = [] results = []
for item in serializer.data: for item in serializer.data:
ids = item['id'] ids = item['id']
# headers = {
# 'content-type': 'application/json',
# 'Authorization': request.META['HTTP_AUTHORIZATION']
# }
req = requests.get(f'{AUTHENTICATOR_GROUP}/{ids}/') req = requests.get(f'{AUTHENTICATOR_GROUP}/{ids}/')
groups = req.json()['groups'] groups = req.json()['groups']
modules = req.json()['modules'] modules = req.json()['modules']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment