fix(ui): updates auth fields UI to reflect access control #12745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Reflects any access control restrictions applied to Auth fields in the UI. I.e. if
email
hasupdate: () => false
the field should be displayed as read-only.Why?
Currently any access control that is applied to auth fields is functional but is not matched within the UI.
For example:
password
that does not have read access will not return data, but the field will still be shown when it should be hiddenemail
that does not have update access, updating the field and saving the doc will not update the data, but it should be displayed as read-only so nothing can be filled out and the updating restriction is made clearHow?
Passes field permissions through to the Auth fields UI and adds docs with instructions on how to override auth field access.
Testing
Use
access-control
test suite andauth
collection. Tests added toaccess-control
e2e.Fixes #11569