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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Michael William Coughlin
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
import
os
FOLLOWUP_USER_NAMES
=
[
'
LUMIN
'
]
def
index
(
request
):
# assert request.ligouser
return
render_to_response
(
...
...
@@ -120,8 +122,9 @@ def upload(request):
msg
=
"
ERROR: missing arg(s)
"
elif
not
event
:
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
elif
event
.
submitter
!=
request
.
ligouser
:
msg
=
"
ERROR: Only submitter can upload files
"
elif
event
.
submitter
!=
request
.
ligouser
and
\
request
.
ligouser
.
name
not
in
FOLLOWUP_USER_NAMES
:
msg
=
"
ERROR: Only submitter or authorized follow-ups can upload files
"
else
:
#event issuer comment
log
=
EventLog
(
event
=
event
,
...
...
@@ -160,8 +163,9 @@ def log(request):
msg
=
"
ERROR: missing arg(s)
"
elif
not
event
:
msg
=
"
ERROR: Event
'
%s
'
does not exist
"
%
graceid
elif
event
.
submitter
!=
request
.
ligouser
:
msg
=
"
ERROR: Only submitter can add log messages
"
elif
event
.
submitter
!=
request
.
ligouser
and
\
request
.
ligouser
.
name
not
in
FOLLOWUP_USER_NAMES
:
msg
=
"
ERROR: Only submitter or authorized follow-ups can log messages
"
else
:
#event issuer comment
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