Skip to content
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

Feat/prsd 358 create controller and service #7

Merged
merged 12 commits into from
Oct 15, 2024

Conversation

JasminConterioSW
Copy link
Contributor

This isn't quite there but I find that PRs are a useful place to ask questions!

In this PR:

  • Add LA_ADMIN or LA_USER roles if a user logs in who is in the local_authority_users database
  • Add a ManageLocalAuthorityUsersController which loads a placeholder page if the logged in user is an LA_ADMIN
  • Get a list of Local Authority Users who are in the same local authority as the logged in user, show their userNames and access levels (isManager)
  • Added tests for the controller to check that the page only checks shown to authorised LA_ADMIN users

To do - add some tests for the services:

  • test the UserRolesService.getRolesForSubjectId function - are the landlord, la_user and la_admin roles getting added correctly?
  • test the LocalAuthorityDataService.getLocalAuthorityUsersForLocalAuthority - this is doing some mapping so check it's being returned correctly
  • test the getLocalAuthorityForUser service - this should return a Local Authority if the logged in user is in the local_authority_users database and should return null if they are not.

@JasminConterioSW JasminConterioSW marked this pull request as draft October 10, 2024 15:35
@JasminConterioSW JasminConterioSW marked this pull request as ready for review October 14, 2024 14:27
@JasminConterioSW
Copy link
Contributor Author

JasminConterioSW commented Oct 14, 2024

I've now added some service tests, updated the landlord repository and updated the readme.
I haven't added the teamDL dummy accounts yet (mainly because I need to wait for it to log me out...) but can put that in the next PR

EDIT: Or I could use incognito mode to make it forget me...

EDIT AGAIN: I've added dummy accounts for a landlord, la admin and la user. The details are in keeper :)

@JasminConterioSW JasminConterioSW force-pushed the feat/PRSD-358-create-service branch from 2b44bb1 to dff9eb7 Compare October 14, 2024 14:36
@JasminConterioSW JasminConterioSW force-pushed the feat/PRSD-358-create-service branch from e96301c to 133c35e Compare October 15, 2024 14:00
Copy link
Collaborator

@Travis-Softwire Travis-Softwire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subject to the point about looking up by entity rather than Id I'm happy with this :)

@JasminConterioSW JasminConterioSW force-pushed the feat/PRSD-358-create-service branch from 94a245f to 728b9a3 Compare October 15, 2024 16:20
@JasminConterioSW JasminConterioSW merged commit 58890e6 into main Oct 15, 2024
1 check passed
@JasminConterioSW JasminConterioSW deleted the feat/PRSD-358-create-service branch October 15, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants