By: Guy Parker named 16 Aug 2017 at 7:34 a.m. CDT

1 Response
Guy Parker gravatar
I mistakenly setup a custom attribute with "Edit Type" and "View Type" both set to user. When I try to edit that custom attribute configuration as an admin user via "/identity/attribute/update" all the fields are read only and the only button available is "Cancel". What do I need to do to get the "Update" and "Delete" buttons to show up again?

By Guy Parker named 16 Aug 2017 at 12:09 p.m. CDT

Guy Parker gravatar
I figured this out for myself and fixed it using an ldif file: ``` # This will fix a custom attribute that has been set to edit and view by user only # 1. Try to edit the bad attribute in the Gluu UI and get the URL # 2. Decode the last part of the URL and use it in step 4 # 3. Run /opt/opendj/bin/ldapsearch -h localhost -p 1636 -Z -X -D "cn=directory manager,o=gluu" -w <InsertYourPWHere> -b "o=gluu" "objectclass=*" gluuAttributeEditType # 4. Find the bad attribute dn by searching for the text from step 2 # 5. Edit the dn line below to match the bad attribute dn found in step 4 # 6. Make sure this file ends with a line feed and is saved in /opt/opendj/ldif/fixReadOnlyCustomAttribute.ldif # 7. Run /opt/opendj/bin/ldapmodify -h localhost -p 1636 -Z -X -D "cn=directory manager,o=gluu" -w <InsertYourPWHere> -f /opt/opendj/ldif/fixReadOnlyCustomAttribute.ldif # 8. Verify change in Gluu UI dn: <InsertBadAttributeDNHere> changetype: modify replace: gluuAttributeEditType gluuAttributeEditType: admin - replace: gluuAttributeViewType gluuAttributeViewType: admin ```