Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
ots
hypha
Commits
71b1d084
Commit
71b1d084
authored
5 years ago
by
Parbhat Puri
Browse files
Options
Downloads
Patches
Plain Diff
review display view permission updates
parent
042c32ab
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
opentech/apply/review/views.py
+5
-3
5 additions, 3 deletions
opentech/apply/review/views.py
with
5 additions
and
3 deletions
opentech/apply/review/views.py
+
5
−
3
View file @
71b1d084
...
@@ -174,17 +174,19 @@ class ReviewDisplay(DetailView):
...
@@ -174,17 +174,19 @@ class ReviewDisplay(DetailView):
submission
=
review
.
submission
submission
=
review
.
submission
partner_has_access
=
submission
.
partners
.
filter
(
pk
=
request
.
user
.
pk
).
exists
()
partner_has_access
=
submission
.
partners
.
filter
(
pk
=
request
.
user
.
pk
).
exists
()
if
user
.
is_reviewer
and
not
user
.
is_apply_staff
:
if
user
.
is_apply_staff
:
pass
elif
user
.
is_reviewer
:
if
user
!=
author
and
not
review
.
reviewer_visibility
:
if
user
!=
author
and
not
review
.
reviewer_visibility
:
raise
PermissionDenied
raise
PermissionDenied
elif
user
.
is_partner
:
elif
user
.
is_partner
:
if
user
!=
author
and
not
(
partner_has_access
and
review
.
reviewer_visibility
):
if
user
!=
author
and
not
(
partner_has_access
and
review
.
reviewer_visibility
):
raise
PermissionDenied
raise
PermissionDenied
elif
user
.
is_community_reviewer
:
elif
user
.
is_community_reviewer
:
if
user
!=
author
and
not
(
submission
.
community_review
and
review
.
reviewer_visibility
):
if
user
!=
author
and
not
(
submission
.
community_review
and
review
.
reviewer_visibility
):
raise
PermissionDenied
raise
PermissionDenied
else
:
raise
PermissionDenied
if
review
.
is_draft
:
if
review
.
is_draft
:
return
HttpResponseRedirect
(
reverse_lazy
(
'
apply:submissions:reviews:form
'
,
args
=
(
review
.
submission
.
id
,)))
return
HttpResponseRedirect
(
reverse_lazy
(
'
apply:submissions:reviews:form
'
,
args
=
(
review
.
submission
.
id
,)))
...
...
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