Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GraceDB Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
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
IGWN Computing and Software
GraceDB
GraceDB Server
Commits
c21a77c4
Commit
c21a77c4
authored
15 years ago
by
Brian Moe
Browse files
Options
Downloads
Patches
Plain Diff
Allow follow up users to log/upload to any event.
Note that authorized followup user names are hardcoded into views.py
parent
d785ed45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gracedb/views.py
+8
-4
8 additions, 4 deletions
gracedb/views.py
with
8 additions
and
4 deletions
gracedb/views.py
+
8
−
4
View file @
c21a77c4
...
@@ -14,6 +14,8 @@ from translator import handle_uploaded_data
...
@@ -14,6 +14,8 @@ from translator import handle_uploaded_data
import
os
import
os
FOLLOWUP_USER_NAMES
=
[
'
LUMIN
'
]
def
index
(
request
):
def
index
(
request
):
# assert request.ligouser
# assert request.ligouser
return
render_to_response
(
return
render_to_response
(
...
@@ -120,8 +122,9 @@ def upload(request):
...
@@ -120,8 +122,9 @@ def upload(request):
msg
=
"
ERROR: missing arg(s)
"
msg
=
"
ERROR: missing arg(s)
"
elif
not
event
:
elif
not
event
:
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
elif
event
.
submitter
!=
request
.
ligouser
:
elif
event
.
submitter
!=
request
.
ligouser
and
\
msg
=
"
ERROR: Only submitter can upload files
"
request
.
ligouser
.
name
not
in
FOLLOWUP_USER_NAMES
:
msg
=
"
ERROR: Only submitter or authorized follow-ups can upload files
"
else
:
else
:
#event issuer comment
#event issuer comment
log
=
EventLog
(
event
=
event
,
log
=
EventLog
(
event
=
event
,
...
@@ -160,8 +163,9 @@ def log(request):
...
@@ -160,8 +163,9 @@ def log(request):
msg
=
"
ERROR: missing arg(s)
"
msg
=
"
ERROR: missing arg(s)
"
elif
not
event
:
elif
not
event
:
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
elif
event
.
submitter
!=
request
.
ligouser
:
elif
event
.
submitter
!=
request
.
ligouser
and
\
msg
=
"
ERROR: Only submitter can add log messages
"
request
.
ligouser
.
name
not
in
FOLLOWUP_USER_NAMES
:
msg
=
"
ERROR: Only submitter or authorized follow-ups can log messages
"
else
:
else
:
#event issuer comment
#event issuer comment
log
=
EventLog
(
event
=
event
,
issuer
=
request
.
ligouser
,
comment
=
message
)
log
=
EventLog
(
event
=
event
,
issuer
=
request
.
ligouser
,
comment
=
message
)
...
...
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