Skip to content

Commit

Permalink
Give holiday access to employees (#1829)
Browse files Browse the repository at this point in the history
* give holiday access to employees

* fix comment
  • Loading branch information
apoorv1316 authored May 2, 2024
1 parent b3d3b84 commit 18c1354
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/policies/holiday_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

class HolidayPolicy < ApplicationPolicy
def update?
authorize_current_user
admin_access?
end

def index?
authorize_current_user
admin_access? || user_employee_role?
end

def authorize_current_user
def admin_access?
user_owner_role? || user_admin_role?
end
end

0 comments on commit 18c1354

Please sign in to comment.