diff --git a/app/controllers/api/v0/base_controller.rb b/app/controllers/api/v0/base_controller.rb index 158c043..c3ed859 100644 --- a/app/controllers/api/v0/base_controller.rb +++ b/app/controllers/api/v0/base_controller.rb @@ -132,6 +132,7 @@ # end # end OrgTokenPermission.where(organisation_id: @user.organisation_id).find_each do |org_token_permission| + logger.debug "#{org_token_permission.token_permission_type.token_type}" if org_token_permission.token_permission_type.token_type == auth_type auth= true end diff --git a/app/controllers/api/v0/guidance_groups_controller.rb b/app/controllers/api/v0/guidance_groups_controller.rb index f28b642..a506a0b 100644 --- a/app/controllers/api/v0/guidance_groups_controller.rb +++ b/app/controllers/api/v0/guidance_groups_controller.rb @@ -22,7 +22,7 @@ def show # check if the user has permission to use the guidances api - if has_auth("guidance") + if has_auth("guidances") # determine if they have authorization to view this guidance group if GuidanceGroup.can_view?(@user, params[:id]) respond_with get_resource @@ -44,7 +44,7 @@ def index - if has_auth("guidance") + if has_auth("guidances") @all_viewable_groups = GuidanceGroup.all_viewable(@user) respond_with @all_viewable_groups else