[Archivesspace_Users_Group] New user creation issue "Must be one of: ISAAR (CPF) and NCA Rules"

Philip Webster philip.webster at sheffield.ac.uk
Tue Nov 22 06:22:57 EST 2022



I’m the admin for ArchivesSpace at the University of Sheffield, in the UK. We’ve had ArchivesSpace since version 2.7, and we currently run 2.8.1 with plans to move to 3.2.0 within the next month.


During our initial setup and launch, a number of user accounts were created for our permanent archival, metadata and technical staff. Since then we have had two new members of staff who qualified for ArchivesSpace accounts on our local system.


Unfortunately, it hasn’t been possible to create these accounts due to an issue in the staff user interface. I have populated the fields on the user form, and this is always done using the ‘admin’ account. When the form is submitted, the response is as follows:


Invalid value 'local'. Must be one of 'ISAAR (CPF) and NCA Rules'

User not created


Looking at the logs, I see that the frontend is sending the following data to the server (response lines are also shown, sensitive information redacted):

I, [2022-11-17T17:45:11.671710 #98122]  INFO -- : Started POST "/users" for REDACTED-IP at 2022-11-17 17:45:11 +0000

I, [2022-11-17T17:45:11.822783 #98122]  INFO -- : Processing by UsersController#create as HTML

I, [2022-11-17T17:45:11.823274 #98122]  INFO -- :   Parameters: {"utf8"=>"✓", "authenticity_token"=>"REDACTED", "user"=>{"lock_version"=>"", "username"=>"testuser_t", "name"=>"testuser", "email"=>dummy at sheffield.ac.uk, "first_name"=>"test", "last_name"=>"user", "telephone"=>"", "title"=>"", "department"=>"Library", "additional_contact"=>"", "password"=>"[FILTERED]", "confirm_password"=>"[FILTERED]", "is_active_user"=>"1"}}

D, [2022-11-17T17:45:12.171371 #98122] DEBUG -- : Thread-3254: POST /users?repo_id=2&password=[FILTERED] [session: #<Session:REDACTED @store={:user=>"admin", :login_time=>2022-11-17 17:15:54 +0000, :expirable=>true}, @system_mtime=2022-11-17 17:44:46 UTC, @id="REDACTED">]

D, [2022-11-17T17:45:12.185350 #98122] DEBUG -- : Thread-3254: Post-processed params: {"password"=>"[FILTERED]", "user"=>#<JSONModel(:user) {"username"=>"testuser_t", "name"=>"testuser", "email"=>dummy at sheffield.ac.uk, "first_name"=>"test", "last_name"=>"user", "department"=>"Library", "is_active_user"=>true, "is_admin"=>false, "jsonmodel_type"=>"user", "groups"=>[]}>}

D, [2022-11-17T17:45:12.252354 #98122] DEBUG -- : Thread-3254: Responded with [400, {"Content-Type"=>"application/json", "Cache-Control"=>"private, must-revalidate, max-age=0", "Content-Length"=>"424"}, ["{\"error\":{\"rules\":[\"Invalid value 'local'.  Must be one of: ISAAR (CPF) and NCA Rules\"]},\"warning\":{},\"invalid_object\":\"#<JSONModel(:name_person) {\\\"primary_name\\\"=>\\\"testuser\\\", \\\"source\\\"=>\\\"local\\\", \\\"rules\\\"=>\\\"local\\\", \\\"name_order\\\"=>\\\"direct\\\", \\\"sort_name_auto_generate\\\"=>true, \\\"use_dates\\\"=>[], \\\"authorized\\\"=>true... in 83ms

I, [2022-11-17T17:45:12.307673 #98122]  INFO -- :   Rendering users/new.html.erb within layouts/application

I, [2022-11-17T17:45:12.383514 #98122]  INFO -- :   Rendered shared/_breadcrumb.html.erb (38.6ms)

I, [2022-11-17T17:45:12.385550 #98122]  INFO -- :   Rendered users/_toolbar.html.erb (0.3ms)

I, [2022-11-17T17:45:12.434052 #98122]  INFO -- :   Rendered shared/_flash_messages.html.erb (31.9ms)

I, [2022-11-17T17:45:12.434746 #98122]  INFO -- :   Rendered shared/_form_messages.html.erb (33.4ms)

I, [2022-11-17T17:45:12.639900 #98122]  INFO -- :   Rendered users/_form.html.erb (232.9ms)

I, [2022-11-17T17:45:12.645463 #98122]  INFO -- :   Rendered users/new.html.erb within layouts/application (329.1ms)

I, [2022-11-17T17:45:12.769050 #98122]  INFO -- :   Rendered shared/_header_user.html.erb (69.8ms)

I, [2022-11-17T17:45:12.777940 #98122]  INFO -- :   Rendered shared/_header_global.html.erb (87.0ms)

I, [2022-11-17T17:45:12.781522 #98122]  INFO -- :   Rendered site/_branding.html.erb (0.5ms)

I, [2022-11-17T17:45:13.045561 #98122]  INFO -- :   Rendered shared/_advanced_search.html.erb (25.5ms)

I, [2022-11-17T17:45:13.105096 #98122]  INFO -- :   Rendered shared/_header_repository.html.erb (322.2ms)

I, [2022-11-17T17:45:13.110247 #98122]  INFO -- :   Rendered site/_footer.html.erb (0.5ms)

I, [2022-11-17T17:45:13.139762 #98122]  INFO -- :   Rendered shared/_templates.html.erb (24.2ms)

I, [2022-11-17T17:45:13.167381 #98122]  INFO -- : Completed 200 OK in 1343ms (Views: 857.1ms)



I’ve tested this on a dev server with a backup of our production database, with the ArchivesSpace code replaced with stock builds of 2.8.1 and 3.2.0 from GitHub, using a near-default config that only had the changes necessary to allow connection to MySQL and to specify the PUI/SUI URLs. In these cases the problem still occurs.


I have also tried dropping the entire database and created a fresh set of tables (without data) using the database setup script. This seems to work. Thus I conclude that something in the database affects the operation of the user creation component, and this is independent from the config file or code.


The key issue is that a value of ‘local’ is being passed, and the error message is telling me that it should instead "Must be one of: ISAAR (CPF) and NCA Rules”.


What do I need to do to get rid of the ‘local’ value that is being passed and to get the correct value instead?




Philip Webster

The University Library

University of Sheffield





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20221122/e670ce9f/attachment.html>

More information about the Archivesspace_Users_Group mailing list