Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
netvs-middleware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-middleware
Commits
aeb6bf91
Verified
Commit
aeb6bf91
authored
1 month ago
by
Janis Streib
Browse files
Options
Downloads
Patches
Plain Diff
UPD: only allow patch request on devel if user has wapi.devel_tester role
parent
d67f6b7d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#409251
passed
1 month ago
Stage: lint
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/patch_request.py
+7
-0
7 additions, 0 deletions
api/patch_request.py
with
7 additions
and
0 deletions
api/patch_request.py
+
7
−
0
View file @
aeb6bf91
...
...
@@ -146,6 +146,13 @@ async def handle_request(patch_request_form_request: PatchRequestFormRequest,
def
validate_patch_request_actions
(
conn
,
user
,
actions
:
list
[
APIPatchRequestAction
])
->
list
[
PatchRequestAction
]:
internal_actions
=
[]
host_is_prod
=
db
.
host_omdl
.
OP_ENV_IS_PROD
if
not
host_is_prod
and
not
user
.
has_permission
(
conn
,
'
wapi.devel_versions_user
'
):
raise
HTTPException
(
status_code
=
status
.
HTTP_400_BAD_REQUEST
,
detail
=
'
This is the development site!
'
'
Please use patch request on the production site (https://netvs.scc.kit.edu)
'
)
for
action
in
actions
:
internal_action
=
PatchRequestAction
()
# TODO handle unpatch vs missing parameters
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment