Skip to content

Us01 user info module #74

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

Merged
merged 15 commits into from
Jan 25, 2023
Merged

Us01 user info module #74

merged 15 commits into from
Jan 25, 2023

Conversation

PolonaM
Copy link
Collaborator

@PolonaM PolonaM commented Jan 18, 2023

Added user_info module

@PolonaM PolonaM self-assigned this Jan 18, 2023
@PolonaM PolonaM requested a review from justinc1 January 18, 2023 10:57
Comment on lines 40 to 42
role_uuids:
- 38b346c6-a626-444b-b6ab-92ecd671afc0
- 7224a2bd-5a08-4b99-a0de-9977089c66a4
Copy link
Collaborator

Choose a reason for hiding this comment

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

Role uuid does not tell much. I guess later we will need to add also a role name. But dedicated role_info module is out of scope in this phase, so I want only to have format that will allow future modification in backward compatible way.

If today we output:

  sample:
    - fullname: xlab
      roles:
        - uuid: 38b346c6-a626-444b-b6ab-92ecd671afc0
        - uuid: 7224a2bd-5a08-4b99-a0de-9977089c66a4

And in future we can extend with (role) name:

  sample:
    - fullname: xlab
      roles:
        - uuid: 38b346c6-a626-444b-b6ab-92ecd671afc0
          name: admin
        - uuid: 7224a2bd-5a08-4b99-a0de-9977089c66a4
          name: backup

Copy link
Collaborator

Choose a reason for hiding this comment

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

Update @PolonaM: please include role name in user_info output. Also when creating a new user, roles will need to be selected, and role will be identified by name.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@justinc1 Thanks for the comments! I added role name to the output. I also added option username to the module.

@PolonaM PolonaM force-pushed the US01_user_info_module branch from 60acd10 to cbd0857 Compare January 24, 2023 09:58
@PolonaM PolonaM requested a review from justinc1 January 24, 2023 11:42
- ansible.builtin.assert:
that:
- users.records != []
- "{{ users.records[0].keys() | sort == ['fullname', 'roles', 'session_limit', 'username', 'uuid'] }}"
Copy link
Collaborator

@justinc1 justinc1 Jan 25, 2023

Choose a reason for hiding this comment

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

(users.records[0].keys() | sort) == ['full_name', 'roles', 'session_limit', 'username', 'uuid']

"{{ not needed, full_name vs fullname

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Tanks for the comment, integration test fixed

Copy link
Collaborator

@justinc1 justinc1 left a comment

Choose a reason for hiding this comment

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

minor changes

@PolonaM PolonaM requested a review from justinc1 January 25, 2023 11:29
@PolonaM PolonaM force-pushed the US01_user_info_module branch from 6786839 to 32218f0 Compare January 25, 2023 11:31
Copy link
Collaborator

@justinc1 justinc1 left a comment

Choose a reason for hiding this comment

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

Thank you :)

@justinc1 justinc1 merged commit 80e54e4 into main Jan 25, 2023
@justinc1 justinc1 deleted the US01_user_info_module branch January 25, 2023 20:16
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