-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lb/current user method #40
Conversation
@@ -4,7 +4,7 @@ | |||
|
|||
feature "Sign In as Persona" do | |||
around do |example| | |||
Capybara.app_host = "https://#{ENV["PLACEMENTS_HOST"]}" | |||
Capybara.app_host = "https://#{ENV["CLAIMS_HOST"]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a quick fix for the persona test -- I'm actually splitting it into two different tests (one for claims, one for placements in the next PR, but I just want to get the current_user stuff in so we can all use it for now.
it do | ||
is_expected.to validate_uniqueness_of(:provider_code).case_insensitive | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linting, not sure how this snuck in...
36b1d58
to
35c19c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolves the issue of User
being assigned to :current_user
Context
See slack thread: https://ukgovernmentdfe.slack.com/archives/C06962474AC/p1702994098513929
We need the
current_user
method to return a Service::User object, not aDfeSignInUser
instance.I did this as part of the support_user journey work, it makes sense to implement it earlier as needed in other places.
Changes proposed in this pull request
When a user is logged in a service, the
current_user
method returns the appropriate user object -Placements::User
for the placements service,Claims::User
for the claims serviceNo UI changes.
Guidance to review
Link to Trello card
Things to check
Screenshots