-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into liz/claim-appt-asso…
…ciation-logic
- Loading branch information
Showing
475 changed files
with
9,482 additions
and
3,744 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
module AppointmentAuthorization | ||
extend ActiveSupport::Concern | ||
|
||
protected | ||
|
||
def authorize | ||
raise_access_denied unless current_user.loa3? | ||
raise_access_denied_no_icn if current_user.icn.blank? | ||
end | ||
|
||
def authorize_with_facilities | ||
authorize | ||
raise_access_denied_no_facilities unless current_user.authorize(:vaos, :facilities_access?) | ||
end | ||
|
||
def raise_access_denied | ||
raise Common::Exceptions::Forbidden, detail: 'You do not have access to online scheduling' | ||
end | ||
|
||
def raise_access_denied_no_icn | ||
raise Common::Exceptions::Forbidden, detail: 'No patient ICN found' | ||
end | ||
|
||
def raise_access_denied_no_facilities | ||
raise Common::Exceptions::Forbidden, detail: 'No facility associated with user' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
class ClaimVANotification < ApplicationRecord | ||
belongs_to :saved_claim | ||
|
||
validates :form_type, presence: true | ||
validates :email_template_id, presence: true | ||
validates :email_sent, inclusion: { in: [true, false] } | ||
end |
Oops, something went wrong.