Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
c2fb895d
Commit
c2fb895d
authored
Jun 04, 2019
by
John Red Medrano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed checking permission at utils
parent
a1c58766
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
api/utils.py
api/utils.py
+1
-1
api/viewsets/applications.py
api/viewsets/applications.py
+4
-0
No files found.
api/utils.py
View file @
c2fb895d
...
...
@@ -102,10 +102,10 @@ class Helper:
'Authorization'
:
request
.
META
[
'HTTP_AUTHORIZATION'
],
'Content-Type'
:
'application/json'
,
"endpoint"
:
str
(
endpoint
.
id
)
# "user": str(endpoint.name),
}
req
=
requests
.
post
(
VALIDATE_TOKEN_URL
,
headers
=
self
.
_headers
)
print
(
req
)
all_headers
=
{
**
req
.
headers
,
**
self
.
_headers
}
if
req
.
status_code
==
200
:
...
...
api/viewsets/applications.py
View file @
c2fb895d
...
...
@@ -68,6 +68,10 @@ class ApplicationViewSet(viewsets.ModelViewSet):
results
=
[]
for
item
in
serializer
.
data
:
ids
=
item
[
'id'
]
# headers = {
# 'content-type': 'application/json',
# 'Authorization': request.META['HTTP_AUTHORIZATION']
# }
req
=
requests
.
get
(
f
'{AUTHENTICATOR_GROUP}/{ids}/'
)
groups
=
req
.
json
()[
'groups'
]
modules
=
req
.
json
()[
'modules'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment