bety
bety copied to clipboard
Questionable defaults for data access level in edit forms for traits and yields
When updating an object, usually the editing form is pre-filled with the existing values of all attributes of the object. This includes select dropdowns as well: usually the default value equals whatever the current value is. But this is not the case for the "access_level" attribute of traits and yields.
In the yields editing form, the access level defaults to the data access level of the user currently logged in no matter what the current data access level value is for the yield being edited. This means, for example, that a user with data access level 3 (External Researcher) who want to add a note to a yield with data access level 4 (Public), might go into the edit form, type the note, click "Update", and thereby inadvertently cause the yield to be restricted to non-Public users.
Even more problematic, the default access level when editing a trait is always 2 (Internal EBI & Collaborators). This means that a user with data access level 3 may inadvertently lock him/herself out of the trait record when adding a note to it.
@dlebauer How ought this to work?