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

[Declarative User Profile] Attributes are created as required by default but switch is set to "not required" #20852

Closed
2 tasks done
Tracked by #23905
jbman opened this issue Jun 7, 2023 · 3 comments
Closed
2 tasks done
Tracked by #23905
Labels
Milestone

Comments

@jbman
Copy link

jbman commented Jun 7, 2023

Before reporting an issue

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

Area

user-profile

Describe the bug

When declaring a new attribute with "required" switch "off", the attribute is required after saving.

Version

21.1.1

Expected behavior

The attribute should be stored as not required

Actual behavior

The attribute is stored as required, although switch is set to off and isn't toggled.

How to Reproduce?

Create an attribute with just a name and save.
image

Open the attribute and see that it is required now.
image

Anything else?

Workaround: When you know the bug, you can open the attribute and correct the setting. If not known, it is a surprise that user's can't be created any more without a value for the attribute.

@jbman jbman added kind/bug Categorizes a PR related to a bug status/triage labels Jun 7, 2023
@jbman
Copy link
Author

jbman commented Jun 7, 2023

Also the fine grained required settings seem to be broken:
"Required when" is set to "Always" but there are scopes listed in the JSON representation.

image

Stored as:

{
        ...,
	"required": {
		"roles": [
			"admin",
			"user"
		],
		"scopes": [
			"role_list",
			"profile",
			"email",
			"acr",
			"microprofile-jwt",
			"offline_access",
			"phone",
			"address",
			"roles",
			"web-origins"
		]
	}
}

@mposolda mposolda added this to the Backlog milestone Jun 20, 2023
@mposolda
Copy link
Contributor

@jbman Thanks for the report. I am adding to Backlog for now. We may need to revisit if we want to make user-profile to be supported feature.

@pedroigor
Copy link
Contributor

Thanks. The behavior looks correct and fixed in both the latest release (22.0.4) and upstream/main.

@pedroigor pedroigor closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants