Skip to content

feat(#0059): replace in-component permission check with route guard in UsersListComponent - #62

Closed
hectorguillen-blip wants to merge 30 commits into
masterfrom
feature/user-display-authorization
Closed

feat(#0059): replace in-component permission check with route guard in UsersListComponent#62
hectorguillen-blip wants to merge 30 commits into
masterfrom
feature/user-display-authorization

Conversation

@hectorguillen-blip

Copy link
Copy Markdown

Description

Addresses PR feedback on the Users module migration.

Changes

Route guard on Users route

  • Replaced in-component authService.has('can_configure') check in UsersListComponent.ngOnInit() with the existing AppRouteGuardProvider
  • Unauthorized users are now redirected to the 403 page before the component loads instead of seeing an empty page
  • ngOnInit is now async and calls loadUsers() directly
  • AuthService dependency removed from UsersListComponent

Token login passthrough

  • EditUserComponent.populateModel() no longer computes expired, expirationDate, or loginDate client-side
  • tokenLoginEnabled now stores the raw token_login object from the server as-is (User['token_login'] | null)
  • Template updated to use expiration_date directly instead of the previously computed expired field

oidc_username added to User interface

  • Added oidc_username?: string to the User interface in users-interfaces.ts
  • Removed as any casts in EditUserComponent.populateModel() for email and oidc_username

Checklist

  • Readable — follows style guide, ESLint passing
  • Tested — unit tests updated to reflect removal of AuthService from UsersListComponent

dependabot Bot and others added 30 commits February 25, 2026 06:46
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Diana Barsan <35681649+dianabarsan@users.noreply.github.com>
Co-authored-by: Diana Barsan <barsan@medic.org>
…c#10683)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…abot commits (medic#10521)

Co-authored-by: Joshua Kuestersteffen <jkuester@kuester7.com>
Co-authored-by: Diana Barsan <35681649+dianabarsan@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Javier Perez <thxuapp@gmail.com>
…c#10711)

adds admin-tool build commands to main `build-dev` and `build-dev-watch`
adds express endpoint for admin-tool

Co-authored-by: Javier Perez <thxuapp@gmail.com>
Co-authored-by: Javier Perez <thxuapp@gmail.com>
* Adding authentication logic

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* Corrections based on comments made in the PR

* changes based on the new PR feedback

* Delete an unused import

* Changing the interface response state and HTML state, and related tests

* fixing lint errors

* solution to indentation problem

---------

Co-authored-by: Javier Perez <thxuapp@gmail.com>
* feat: implement users list with mock data and fix module imports

* Adding authentication logic

* feat: implement users service and finalize users-list component

* feat: implement users list view with permission guard and unit tests

* fix: add missing newline at end of files

* fix: apply PR feedback - buttons, @if/@for, translate, aria-labels, rem units, User interface, global variables

* style: fix indentation and code formatting

* fix: use single quotes in users service and spec

* fix: apply PR feedback - use @else, wrap columns in @if, fix empty users iteration

* fix: remove duplicate bracket in app.config.ts after merge

* fix: use single quotes in app.config.ts

* chore: rebase onto 7369-admin-angular-upgrade

* fix: use single quotes after rebase

---------

Co-authored-by: Javier Perez <thxuapp@gmail.com>
* Adding authentication logic

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: add authorizathion base(header, routes, guard, interfaces) feature/roles-list-010

* feat: complete view of roles-list with unit testing and comments

* Corrections based on comments made in the PR

* changes based on the new PR feedback

* Delete an unused import

* Changing the interface response state and HTML state, and related tests

* Final view of roles-list-010 with testing and comments

* fix: change lenght of two imports

* fixed based on the PR feedback

---------

Co-authored-by: Javier Perez <thxuapp@gmail.com>
* Adding i18n support

* Removing claude skill

* Fixing linter error
* Adding authentication logic

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: add authorizathion base(header, routes, guard, interfaces) feature/roles-list-010

* feat: complete view of roles-list with unit testing and comments

* Corrections based on comments made in the PR

* changes based on the new PR feedback

* Delete an unused import

* Changing the interface response state and HTML state, and related tests

* Final view of roles-list-010 with testing and comments

* fix: change lenght of two imports

* fixed based on the PR feedback

* feat: add and delete roles with testing, without comments

* feat: comments on the add and remove roles functions

* add TranslatePipe provisional

* fix: lint error

* change error color and use a global color

* fix an error in the view of display header and add the translation for validateRole function

---------

Co-authored-by: Javier Perez <thxuapp@gmail.com>
* Adding authentication logic

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: Initial preview feat/display_date_time_002

* feat: Test with endpoints feat/date_time_display_002

* feat: initial unitTesting and fix errors date_time_display_002

* feat: Complete unit testing and comments have been added feat/date_time_display_002

* feat: add authorizathion base(header, routes, guard, interfaces) feature/roles-list-010

* feat: complete view of roles-list with unit testing and comments

* Corrections based on comments made in the PR

* changes based on the new PR feedback

* Delete an unused import

* Changing the interface response state and HTML state, and related tests

* Final view of roles-list-010 with testing and comments

* fix: change lenght of two imports

* fixed based on the PR feedback

* feat: add and delete roles with testing, without comments

* feat: comments on the add and remove roles functions

* add TranslatePipe provisional

* fix: lint error

* change error color and use a global color

* fix an error in the view of display header and add the translation for validateRole function

* feat(authorizationPermissions): initial view of permissions with roles

* fix: lint error

* unit test for configure permissions

* configure permissions comments and fix lint error

* add two comments settingsService

* changes based on git comments

---------

Co-authored-by: Javier Perez <thxuapp@gmail.com>
* feat: implement users list with mock data and fix module imports

* feat: implement users service and finalize users-list component

* feat: implement users list view with permission guard and unit tests

* WIP: saving progress before switching branches

* feat: add contact types and select2 search services with associated unit tests for user creation

* feat: implement create user modal with roles, facility, contact, token login and SSO support

* feat: implement create user modal with roles, facility, contact, token login and SSO support

* fix: address PR feedback - translation keys, styles, template structure and code quality

* fix: eslint curly braces and quote style

* Update admin-tool/src/ts/modules/users/ts/components/users-list/users-list.component.ts

Co-authored-by: Jose Carvajal <77166182+jomcarvajal@users.noreply.github.com>

* Update admin-tool/src/ts/modules/users/ts/components/create-user/create-user.component.ts

Co-authored-by: Jose Carvajal <77166182+jomcarvajal@users.noreply.github.com>

* fix: restore submit() method broken by bad GitHub suggestion

* fix: eslint curly braces and end of file newline

---------

Co-authored-by: Jose Carvajal <77166182+jomcarvajal@users.noreply.github.com>
* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments
* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments

* add language settings configuration without comments and without unit testing

* Add comments and unit testing to languages settings functionality

* fix error in the accordion stars
* feat(#5): implement edit and delete user modals

* feat(#5): implement edit and delete user modals

* fix: eslint curly braces and indentation

* fix: address PR feedback - centering modals, rename submit to confirm, fix SSO condition, typed mocks
…locale (#28)

* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments

* add language settings configuration without comments and without unit testing

* Add comments and unit testing to languages settings functionality

* fix error in the accordion stars

* Improvement prevent delete language in use with comments and unit testing
* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments

* add language settings configuration without comments and without unit testing

* Add comments and unit testing to languages settings functionality

* fix error in the accordion stars

* Improvement prevent delete language in use with comments and unit testing

* Initial view of translations tab, without comments and unit testing

* view of translations with comments and unit testing

* feature view and edit translations with comments and unit testing

* fix lint errors

* fix lint error

* changes based on the reviewers' comments

* fix one lint error
* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments

* add language settings configuration without comments and without unit testing

* Add comments and unit testing to languages settings functionality

* fix error in the accordion stars

* Improvement prevent delete language in use with comments and unit testing

* Initial view of translations tab, without comments and unit testing

* view of translations with comments and unit testing

* feature view and edit translations with comments and unit testing

* fix lint errors

* fix lint error

* changes based on the reviewers' comments

* fix one lint error

* Initial view display privacy policies, with comments and unit testing

* fix a conflict with the main branch 7369

* delete and submit privacy policies with comments and unit testing

* preview functionality of privacy policies

* fix lint errors

* fix max len error

* changes based on github comments, change to using sanitize
* feature/display-languages-006: add a initial view display languages, with respective service

* add and edit functionality with unit testing and without comments

* add comments for add and edit functionality

* fix lint errors

* enable-disabled and delete functionality of languages view, with comments and unit testing

* add upload and download translation files functionality with comments, and unit testing

* fix lint errors

* fix conflict error in the merge of create users

* changes based on the pr comments

* add language settings configuration without comments and without unit testing

* Add comments and unit testing to languages settings functionality

* fix error in the accordion stars

* Improvement prevent delete language in use with comments and unit testing

* Initial view of translations tab, without comments and unit testing

* view of translations with comments and unit testing

* feature view and edit translations with comments and unit testing

* fix lint errors

* fix lint error

* changes based on the reviewers' comments

* fix one lint error

* Initial view display privacy policies, with comments and unit testing

* fix a conflict with the main branch 7369

* delete and submit privacy policies with comments and unit testing

* preview functionality of privacy policies

* fix lint errors

* fix max len error

* changes based on github comments, change to using sanitize

* initial view app forms module, with unit testing and comments

* fix lint errors

* upload functionality xml and json files, without comments and without unit testing

* app forms with comments and unit testing

* fix lint errors

* changes based on feedback from the reviewer
@hectorguillen-blip hectorguillen-blip changed the title Feature/user display authorization feat(#0057): replace in-component permission check with route guard in UsersListComponent May 5, 2026
@hectorguillen-blip hectorguillen-blip changed the title feat(#0057): replace in-component permission check with route guard in UsersListComponent feat(#0059): replace in-component permission check with route guard in UsersListComponent May 5, 2026
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.

5 participants