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

Feature/add warning when configuring new role mapping #2876

Merged
merged 8 commits into from Feb 5, 2021

Conversation

pablomarga
Copy link
Contributor

@pablomarga pablomarga commented Feb 1, 2021

Hi team this PR adds a toast warning the user when configuring role mapping if run_as is set to false.

Captura de pantalla 2021-02-01 a las 18 00 07

Closes #2851

@pablomarga pablomarga requested a review from a team February 1, 2021 15:23
@frankeros frankeros changed the base branch from 4.0.4-7.10 to 4.0-7.10 February 1, 2021 15:26
@Desvelao Desvelao added the type/enhancement Enhancement issue label Feb 2, 2021
@frankeros frankeros changed the base branch from 4.0-7.10 to 4.1-7.10 February 3, 2021 13:37
@Desvelao
Copy link
Member

Desvelao commented Feb 4, 2021

I tested the PR and I found the callout is showing in all Security section tabs, like this:
image

Do we want to show this message in all tabs of the Security section or it should only appear in Roles mapping tab?

@frankeros
Copy link
Contributor

I tested it, works well but when you have the setting run_as as true the callout is displayed for a while and then it disappears.
It looks like the callout is displayed by default until the request for allowedRunAs is got.

@@ -103,10 +145,13 @@ export const WzSecurity = compose(
<Policies></Policies>
}
{selectedTabId === 'roleMapping' &&
<RolesMapping></RolesMapping>
<>
{allowRunAs !== API_USER_STATUS_RUN_AS.ENABLED && isNotRunAs()}
Copy link
Contributor

Choose a reason for hiding this comment

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

you could add another state to wait for the request to complete, maybe

{allowRunAs !== API_USER_STATUS_RUN_AS.ENABLED && !allowRunAsIsLoading && isNotRunAs()}

Copy link
Contributor

@frankeros frankeros left a comment

Choose a reason for hiding this comment

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

LGTM!

@frankeros frankeros merged commit ce931ff into 4.1-7.10 Feb 5, 2021
@frankeros frankeros deleted the feature/add-warn-RBAC branch February 5, 2021 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Enhancement issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants