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

When choosing resources in scope-based permission, multiple resource can be selected but only one will be visable #20304

Closed
2 tasks done
kopecmaciej opened this issue May 11, 2023 · 5 comments · Fixed by #20410 or #25623
Assignees

Comments

@kopecmaciej
Copy link

kopecmaciej commented May 11, 2023

Before reporting an issue

  • I have searched existing issues
  • I have reproduced the issue with the latest release

Area

admin/ui

Describe the bug

In the Admin-UI in the Authorization panel I've tried to create a scope-base permission with multiple resources, but the dropdown is designed to select only one (although the field is named the same as in the resource-base permission: "Resources"), but if you still click on multiple resources they are added even though only one is visible

Version

21.1.0

Expected behavior

This is example after I've removed the variant from ResourcesPolicySelect (which default value is typeaheadMulti)
variant={ permissionType === "scope" ? SelectVariant.typeahead : SelectVariant.typeaheadMulti }
from here:
https://github.com/keycloak/keycloak/blob/main/js/apps/admin-ui/src/clients/authorization/PermissionDetails.tsx#L314
Screenshot from 2023-05-11 10-21-16

I don't know if this could be the fix here or the SelectVariant.typeahead should be modified.

Actual behavior

As it can be seen below, after adding multiple resources, only one is visible in the UI, but more are saved and it's hard to manage them from the UI.
Screenshot from 2023-05-11 10-24-05
Screenshot from 2023-05-11 10-21-57

How to Reproduce?

Create scope-base permission with multiple resources

Anything else?

No response

@kopecmaciej kopecmaciej added kind/bug Categorizes a PR related to a bug status/triage labels May 11, 2023
@ssilvert
Copy link
Contributor

I have reproduced this. Weird thing for me is that the Authorization scopes field is also acting strange. It becomes blank after saving.

@kopecmaciej
Copy link
Author

Hmm, I've tried different approaches and had a problem only with Resources, but maybe I did not come across this particular case. One problem with my proposed solution to remove the variant field from ResourcesPolicySelect is that when you select multiple Resources then the Authorization scopes that can be selected will be taken from the first Resource selected (and not from all or the common ones).

@GreenEyedAndy
Copy link

I'm using 22.0.1 now and I still can't select more than one resource.
Also I have the same problem as @ssilvert and the Authorization Scope is blank after making a change in the resource.

@jonkoops
Copy link
Contributor

If you are still experiencing issues, please open a new issue so we can triage it.

@ssilvert
Copy link
Contributor

I'm just going to reopen this. I have verified that the original problem(s) is not fixed.

@ssilvert ssilvert reopened this Jul 25, 2023
@ssilvert ssilvert removed this from the 22.0.0 milestone Jul 25, 2023
edewit added a commit to edewit/keycloak that referenced this issue Dec 15, 2023
fixes: keycloak#20304
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
edewit added a commit that referenced this issue Jan 9, 2024
fixes: #20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
pedroigor pushed a commit to alice-wondered/keycloak that referenced this issue Jan 12, 2024
fixes: keycloak#20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
wistefan pushed a commit to wistefan/keycloak that referenced this issue Jan 17, 2024
fixes: keycloak#20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Stefan Wiedemann <wistefan@googlemail.com>
kamontat pushed a commit to kamontat/keycloak that referenced this issue Jan 20, 2024
fixes: keycloak#20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Kamontat Chantrachirathumrong <14089557+kamontat@users.noreply.github.com>
ShefeeqPM pushed a commit to ShefeeqPM/keycloak that referenced this issue Jan 27, 2024
fixes: keycloak#20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: ShefeeqPM <86718986+ShefeeqPM@users.noreply.github.com>
ahus1 pushed a commit to ahus1/keycloak that referenced this issue Mar 22, 2024
fixes: keycloak#20304

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants