diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 3cc7b5f..fe5a071 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,8 +1,6 @@ class HomeController < ApplicationController - after_action :verify_authorized def index - authorize User if user_signed_in? name = current_user.name(false) if name.blank? diff --git a/app/policies/home_policy.rb b/app/policies/home_policy.rb deleted file mode 100644 index dbb3d9a..0000000 --- a/app/policies/home_policy.rb +++ /dev/null @@ -1,19 +0,0 @@ -class UserPolicy < ApplicationPolicy - attr_reader :user - - def initialize(user, users) - @user = user - @users = users - end - - def index? - true - end - - class Scope < Scope - def resolve - scope.where(organisation_id: user.organisation_id) - end - end - -end \ No newline at end of file