Skip to content

Commit

Permalink
Fix hiding "Admin" option in datasource access (#753)
Browse files Browse the repository at this point in the history
Logic was inverted and object permission not checked
  • Loading branch information
andyhd authored Oct 2, 2019
1 parent 0ed3a2a commit afb559b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% macro data_access_level_options(access_to_s3bucket=None, hide_admin=False) %}
{% if not hide_admin %}
{% set hide_admin = request.user.has_perm('api.add_s3bucket_admin') %}
{% set hide_admin = not request.user.has_perm('api.add_s3bucket_admin', access_to_s3bucket.s3bucket) %}
{% endif %}
{{ govukRadios({
"name": "access_level",
Expand Down

0 comments on commit afb559b

Please sign in to comment.