Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Add configuration of visibility of profile page #175

Closed
wants to merge 10 commits into from

Conversation

Baschdl
Copy link
Contributor

@Baschdl Baschdl commented Jul 15, 2020

Reads configurations and sets visibility accordingly.

Closes #172

@feeds
Copy link
Collaborator

feeds commented Jul 16, 2020

how about @required_at_least_one(['view_a',view_xy','was_nice_to_santa']) ?

@Baschdl Baschdl marked this pull request as ready for review July 18, 2020 11:53
passes_test += profile_own(uuid_accessed=uuid, uuid_own=u.participant().info.uuid)
if passes_test > 0:
return function(request, p_type, uuid, *args, **kwargs)
raise Http404
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bjrne Did you also implement something like this for 403 or what's the way to do it?

Copy link
Member

Choose a reason for hiding this comment

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

Well a 403 page is implemented now, but you would need to link to it via its name "403". Http404 is the only Exception implemented by django in this way unfortunately:

https://github.com/django/django/blob/3d16496037fbb8a6bbc6b6e354fa4f5eb65e6cea/django/http/response.py#L539

@feeds
Copy link
Collaborator

feeds commented Aug 15, 2020

Closed in favour of #200

@feeds feeds closed this Aug 15, 2020
@bjrne bjrne deleted the configure_visibility branch August 15, 2020 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visibility of pages should be specifiable in configuration
3 participants