diff --git a/app/models/user.rb b/app/models/user.rb index 2a0ac33..bb2ae87 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -214,11 +214,13 @@ # checks what type the user's organisation is # # @return [String] the organisation type +=begin def org_type org_type = org.organisation_type return org_type end - +=end + ## # removes the api_token from the user # modifies the user model diff --git a/app/views/templates/_admin_nav_tabs.html.erb b/app/views/templates/_admin_nav_tabs.html.erb index de4c5fa..d876bd2 100644 --- a/app/views/templates/_admin_nav_tabs.html.erb +++ b/app/views/templates/_admin_nav_tabs.html.erb @@ -19,7 +19,7 @@ <% end %> - <% if current_user.can_org_admin? && (template.org.org_type != constant("organisation_types.funder")|| current_user.org_type == constant("organisation_types.funder")) %> + <% if current_user.can_org_admin? && (template.org.funder? || current_user.org.funder?) %> <% if active == 'add_plan' %>
  • <% else %> diff --git a/app/views/templates/admin_template.html.erb b/app/views/templates/admin_template.html.erb index 0e6c3fc..12edc0c 100644 --- a/app/views/templates/admin_template.html.erb +++ b/app/views/templates/admin_template.html.erb @@ -19,7 +19,7 @@
    - <% if @template.org.org_type != constant("organisation_types.funder") || current_user.org_type == constant("organisation_types.funder") then %> + <% if @template.org.funder? || current_user.org.funder? then %>