<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Segoe UI Symbol \,sans-serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
code
{mso-style-priority:99;
font-family:"Courier New";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
mso-fareast-language:EN-US;}
span.EmailStyle24
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Thanks – this was the solution.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Ideally, it would be nice if the drop-down entry could be hidden in some way without breaking the back-end functionality.<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'>Phil<o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='mso-fareast-language:ZH-CN'>From:</span></b><span lang=EN-US style='mso-fareast-language:ZH-CN'> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> <b>On Behalf Of </b>Andrew Morrison<br><b>Sent:</b> 22 November 2022 12:15<br><b>To:</b> archivesspace_users_group@lyralists.lyrasis.org<br><b>Subject:</b> Re: [Archivesspace_Users_Group] New user creation issue "Must be one of: ISAAR (CPF) and NCA Rules"<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>In the staff interface, go to System > Manage Controlled Value Lists. Then select "Name Rule (name_rule)" from the List Name drop-down. If that list doesn't have a value of "local", or that value has been suppressed, that could be the cause of your problem.<o:p></o:p></p><p>The issue is that creating system users also creates an (unpublished) agent record. So, if you've suppressed local rules for the naming of persons in your metadata, it'll won't be able to create the agent, so it won't be able to create the user either.<o:p></o:p></p><p>Andrew.<o:p></o:p></p><p><o:p> </o:p></p><div><p class=MsoNormal>On 22/11/2022 11:22, Philip Webster wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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:<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p style='margin:0cm'><span style='font-size:10.5pt'>Invalid value 'local'. Must be one of 'ISAAR (CPF) and NCA Rules'</span><o:p></o:p></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:15.0pt;margin-left:0cm'><span style='font-size:10.5pt'>User not created</span><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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):<o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:11.671710 #98122] INFO -- : Started POST "/users" for REDACTED-IP at 2022-11-17 17:45:11 +0000</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:11.822783 #98122] INFO -- : Processing by UsersController#create as HTML</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:11.823274 #98122] INFO -- : Parameters: {"utf8"=>"</span></code><code><span style='font-size:10.0pt;font-family:"Segoe UI Symbol ,sans-serif",serif'>✓</span></code><code><span style='font-size:10.0pt;font-family:Consolas'>", "authenticity_token"=>"REDACTED", "user"=>{"lock_version"=>"", "username"=>"testuser_t", "name"=>"testuser", "email"=><a href="mailto:dummy@sheffield.ac.uk">dummy@sheffield.ac.uk</a>, "first_name"=>"test", "last_name"=>"user", "telephone"=>"", "title"=>"", "department"=>"Library", "additional_contact"=>"", "password"=>"[FILTERED]", "confirm_password"=>"[FILTERED]", "is_active_user"=>"1"}}</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>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">]</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>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"=><a href="mailto:dummy@sheffield.ac.uk">dummy@sheffield.ac.uk</a>, "first_name"=>"test", "last_name"=>"user", "department"=>"Library", "is_active_user"=>true, "is_admin"=>false, "jsonmodel_type"=>"user", "groups"=>[]}>}</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>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\":[\"<span style='background:yellow;mso-highlight:yellow'>Invalid value 'local'. Must be one of: ISAAR (CPF) and NCA Rules\</span>"]},\"warning\":{},\"invalid_object\":\"#<JSONModel(:name_person) {\\\"primary_name\\\"=><a href="file:///%22testuser/">\\\"testuser\\\</a>", <a href="file:///%22source/%22=%3e/%22local/">\\\"source\\\"=>\\\"local\\\</a>", <a href="file:///%22rules/%22=%3e/%22local/">\\\"rules\\\"=>\\\"<span style='background:yellow;mso-highlight:yellow'>local</span>\\\</a>", <a href="file:///%22name_order/%22=%3e/%22direct/">\\\"name_order\\\"=>\\\"direct\\\</a>", <a href="file:///%22sort_name_auto_generate/%22=%3etrue">\\\"sort_name_auto_generate\\\"=>true</a>, <a href="file:///%22use_dates/%22=">\\\"use_dates\\\"=</a>>[], <a href="file:///%22authorized/%22=%3etrue">\\\"authorized\\\"=>true</a>... in 83ms</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.307673 #98122] INFO -- : Rendering users/new.html.erb within layouts/application</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.383514 #98122] INFO -- : Rendered shared/_breadcrumb.html.erb (38.6ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.385550 #98122] INFO -- : Rendered users/_toolbar.html.erb (0.3ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.434052 #98122] INFO -- : Rendered shared/_flash_messages.html.erb (31.9ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.434746 #98122] INFO -- : Rendered shared/_form_messages.html.erb (33.4ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.639900 #98122] INFO -- : Rendered users/_form.html.erb (232.9ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.645463 #98122] INFO -- : Rendered users/new.html.erb within layouts/application (329.1ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.769050 #98122] INFO -- : Rendered shared/_header_user.html.erb (69.8ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.777940 #98122] INFO -- : Rendered shared/_header_global.html.erb (87.0ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:12.781522 #98122] INFO -- : Rendered site/_branding.html.erb (0.5ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:13.045561 #98122] INFO -- : Rendered shared/_advanced_search.html.erb (25.5ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:13.105096 #98122] INFO -- : Rendered shared/_header_repository.html.erb (322.2ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:13.110247 #98122] INFO -- : Rendered site/_footer.html.erb (0.5ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:13.139762 #98122] INFO -- : Rendered shared/_templates.html.erb (24.2ms)</span></code><o:p></o:p></p><p><code><span style='font-size:10.0pt;font-family:Consolas'>I, [2022-11-17T17:45:13.167381 #98122] INFO -- : Completed 200 OK in 1343ms (Views: 857.1ms)</span></code><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>The key issue is that a value of ‘local’ is being passed, and the error message is telling me that it should instead <code><span style='font-size:10.0pt;font-family:Consolas'>"Must be one of: ISAAR (CPF) and NCA Rules”.</span></code><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>What do I need to do to get rid of the ‘local’ value that is being passed and to get the correct value instead?<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Regards,<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>Philip Webster<o:p></o:p></p><p class=MsoNormal>The University Library<o:p></o:p></p><p class=MsoNormal>University of Sheffield<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='mso-fareast-language:ZH-CN'><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>Archivesspace_Users_Group mailing list<o:p></o:p></pre><pre><a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org">Archivesspace_Users_Group@lyralists.lyrasis.org</a><o:p></o:p></pre><pre><a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><o:p></o:p></pre></blockquote></div></body></html>