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

Show clear 403 message #1571

Closed
KasperBrandt opened this issue May 15, 2015 · 3 comments
Closed

Show clear 403 message #1571

KasperBrandt opened this issue May 15, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@KasperBrandt
Copy link
Contributor

Test plan

GIVEN the My Projects page

WHEN a project is unpublished
THEN the 'Update' button should be disabled

WHEN the user is on the page
THEN the 'Add an update' button in the top navigation should not be displayed

WHEN a project's location doesn't have a country
THEN there should be a placeholder stating 'Location unknown'

WHEN a project doesn't have a title
THEN there should be a placeholder stating 'Untitled project'

Issue description

When a user is logged in and goes to the "Add Update" page to update a non-published project, a simple 403 message (forbidden) is displayed.

To make it more clear that they can't post an update (or view the project) because the project is not published, we should provide a more user friendly forbidden message.

@KasperBrandt KasperBrandt added this to the 3.4 Honiara milestone May 15, 2015
@KasperBrandt KasperBrandt added Ready and removed Backlog labels Jun 3, 2015
@kardan kardan modified the milestones: 3.7 Khartoum, 3.5 Islamabad Jul 8, 2015
zzgvh added a commit that referenced this issue Aug 4, 2015
It's not possible to create project updates to projects that aren't
published. Remove the link to the update form in MyRSR's project list
and only link to the form on project pages of published projects.
@kardan kardan added In Progress and removed Backlog labels Aug 4, 2015
@zzgvh
Copy link
Contributor

zzgvh commented Aug 4, 2015

@gabemart I'm assigning this to you for a final UI touch. These lines should be replaced with something like this:

{% if project.is_published %}
  {% has_perm 'rsr.post_updates' project as can_add_update %}
  <a href="{% url 'add-update' project.pk %}">{% trans 'Update' %}</a>
{% else %}
  <!-- a greyed out button without a link -->
{% endif %}

This way we get a consistent look rather than the current cludge:

screenshot_90

Problem is I don't have a clue how to create such a disabled button...

@zzgvh zzgvh assigned gabemart and unassigned zzgvh Aug 4, 2015
gabemart added a commit that referenced this issue Aug 7, 2015
@gabemart
Copy link
Contributor

gabemart commented Aug 7, 2015

screen shot 2015-08-07 at 15 05 56

@zzgvh @KasperBrandt Here is my interpretation of a disabled button

@gabemart gabemart assigned zzgvh and unassigned gabemart Aug 7, 2015
@zzgvh
Copy link
Contributor

zzgvh commented Aug 12, 2015

Looks good to me! @KasperBrandt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

4 participants