Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fixes #2149 and #2191] Project editing permissions #2201

Merged
merged 14 commits into from
May 24, 2016

Conversation

damienallen
Copy link
Contributor

@damienallen damienallen commented May 23, 2016

Fixes #2149
Fixes #2191 (see #2198)

@akvobot
Copy link

akvobot commented May 23, 2016

Checklist

  • Test plan
  • Copyright header
  • Code formatting
  • Documentation

@@ -244,7 +244,7 @@ def project_editor(request, project_id):
except Project.DoesNotExist:
return Http404

if not request.user.has_perm('rsr.change_project', project):
if not request.user.has_perm('rsr.change_project', project) or project.status == 'C':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superusers and Akvo Admins (user.is_superuser and user.is_admin) should always be able to open the project editor for any project.

@KasperBrandt
Copy link
Contributor

KasperBrandt commented May 23, 2016

Published, but 'Complete' projects still have active 'Edit' / 'Results data' / 'Update' buttons in My Projects. In case of non-superusers or Akvo admins, these should be disabled. In case of superusers / admins, only 'Edit' should be enabled.

screen shot 2016-05-23 at 12 00 01

@damienallen damienallen changed the title [Fixes #2149] Raise 403 when editing is not allowed [Fixes #2149][Fixes #2191] Raise 403 when editing is not allowed May 23, 2016
@damienallen damienallen changed the title [Fixes #2149][Fixes #2191] Raise 403 when editing is not allowed [Fixes #2149][Fixes #2191] Project editing permissions fixes May 23, 2016
@damienallen damienallen changed the title [Fixes #2149][Fixes #2191] Project editing permissions fixes [Fixes #2149 and #2191] Project editing permissions May 23, 2016
@damienallen damienallen mentioned this pull request May 23, 2016
@KasperBrandt KasperBrandt merged commit 9210809 into develop May 24, 2016
@KasperBrandt KasperBrandt deleted the #2149-edit-permission branch May 24, 2016 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants