hubzero / hubzero-cms

Platform for Scientific Collaboration
https://hubzero.org
GNU General Public License v2.0
46 stars 58 forks source link

Honor admin settings in user profile Fullname and Email fields #1630

Closed jsperhac closed 1 year ago

jsperhac commented 1 year ago

Issue summary

Though admin settings are available for controlling end-user access to their profile fields for editing, some of these settings do not work as advertised. (see hub.org/administrator -> Members -> Registration)

Edit access to several end user profile fields can be controlled, at several times.

Times:

Control settings:

In theory, the admin could disable editing of the user Email by setting it to Required/Required/Readonly/Readonly. However, in the user profile edit interface, a working Edit link was still displayed (and usable). This fix addresses this problem for the Email and Fullname fields.

This fix

Attempts to set the end-user Email address and Fullname fields as Read Only were unsuccessful. This fix enables:

Testing

In testing, Admin user can set/unset required/readonly/hidden for these fields and the end user's profile editor enables editing, disables editing, hides field accordingly.

It is likely that some of these other profile fields do not behave ideally. This fix and testing of this fix have been focused on Email and Fullname fields.

Testing was performed on the USP AWS dev instance.

See the very general Jira ticket, USP-57.

This fix by @nkissebe and @jsperhac

nkissebe commented 1 year ago

I reworked this commit to handle a few other cases and removed some changes that got picked up between 2.2.22 and dev branches. So closing this PR