diff --git a/app/models/timesheet_entry.rb b/app/models/timesheet_entry.rb index 137cca652e..48a9dbac30 100644 --- a/app/models/timesheet_entry.rb +++ b/app/models/timesheet_entry.rb @@ -137,6 +137,8 @@ def validate_billable_project end def prevent_edit_if_locked + return if Current.user.nil? + if locked && Current.user.primary_role(Current.company) == "employee" errors.add(:base, "Cannot edit a locked timesheet entry. Please contact admin.") end