Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed fixes:
It looks like we are not properly handling permission for the activities lists
If we open the user activities list we were defining
{% set can_show_activity_detail = h.check_access('activity_list', {'id': id, 'include_data': True, 'object_type': object_type}) %}
at a list level (no for each activity)So
can_show_activity_detail
means that the user canuser_update
which is only appropriate to show user activities.But if the user changed a dataset, we want to ask for
package_update
instead before showing the Changes option in the list.I think each activity require to check different permissions before showing
The View this version link points to
activity.package_history
which require theactivity_show
permissionThe Changes link points to
activity.package_changes
which require theactivity_diff
permissionSo in a user activity (also in other activities lists) list we can see links that point to URLs that will return 403
Features:
Please [X] all the boxes above that apply