<commit_before><component name="ca.firstvoices.usermapper.contrib">

  	<require>org.nuxeo.usermapper.service.UserMapperComponent</require>
  	<require>org.nuxeo.ecm.directory.sql.SQLDirectoryFactory</require>

  	<implementation class="org.nuxeo.ecm.directory.sql.SQLDirectoryDescriptor" />
  
  <extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"
    point="directories">
    <directory name="sqlUserDirectory">
      <schema>user</schema>
      <dataSource>jdbc/nxsqldirectory</dataSource>

<table>users</table>
      <idField>username</idField>
      <passwordField>password</passwordField>
      <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
      
      <fieldMapping name="contributors">contributors</fieldMapping>
      <fieldMapping name="comments">comments</fieldMapping>
      
      <autoincrementIdField>false</autoincrementIdField>
      <computeMultiTenantId>false</computeMultiTenantId>
      <dataFile>users.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <querySizeLimit>50</querySizeLimit>
      <references>
        <inverseReference field="groups" directory="sqlGroupDirectory"
          dualReferenceField="members" />
      </references>
    </directory>
    <directory name="sqlGroupDirectory">
      <schema>group</schema>
      <dataSource>jdbc/nxsqldirectory</dataSource>

<table>groups</table>
      <idField>groupname</idField>
      <dataFile>groups.csv</dataFile>
      <createTablePolicy>on_missing_columns</createTablePolicy>
      <autoincrementIdField>false</autoincrementIdField>
      <!-- Add 10 min cache to avoid refetching the groups during login -->
      <cacheTimeout>360</cacheTimeout>
      <cacheMaxSize>1000</cacheMaxSize>
      <references>
        <tableReference field="members" directory="multiUserDirectory"
          table="user2group" sourceColumn="groupId" targetColumn="userId" schema="user2group"
          dataFile="user2group.csv" />
        <tableReference field="subGroups" directory="sqlGroupDirectory"
          table="group2group" sourceColumn="parentGroupId"
          targetColumn="childGroupId" schema="group2group" />
        <inverseReference field="parentGroups" directory="sqlGroupDirectory"
          dualReferenceField="subGroups" />
      </references>
    </directory>
  </extension>

<extension target="org.nuxeo.ecm.platform.usermanager.UserService" point="userManager">
    <userManager>
      <defaultAdministratorId>Administrator</defaultAdministratorId>
      <defaultGroup>members</defaultGroup>
      <users>
        <directory>sqlUserDirectory</directory>
        <virtualUser id="Administrator" searchable="false">
          <password><PASSWORD></password>
          <property name="firstName">Super</property>
          <property name="lastName">Admin</property>
          <group>administrators</group>
        </virtualUser>
      </users>
      <groups>
        <directory>sqlGroupDirectory</directory>
      </groups>
    </userManager>
  </extension>


	<extension target="org.nuxeo.usermapper.service.UserMapperComponent" point="mapper">
	
	  <mapper name="fv" type="js">
	    <mapperScript>
            searchAttributes.put("username", userObject.username);
	        userAttributes.put("username", userObject.username);
	        userAttributes.put("email", userObject.email);
	        userAttributes.put("firstName", userObject.firstName);
	        userAttributes.put("lastName", userObject.lastName);
	        userAttributes.put("comments", userObject.comments);
	        userAttributes.put("contributors", userObject.contributors);
	    </mapperScript>
	  </mapper><commit_msg>Remove unecessary usermanager extension<commit_after><component name="ca.firstvoices.usermapper.contrib">

  	<require>org.nuxeo.usermapper.service.UserMapperComponent</require>
  	<require>org.nuxeo.ecm.directory.sql.SQLDirectoryFactory</require>

  	<implementation class="org.nuxeo.ecm.directory.sql.SQLDirectoryDescriptor" />
  
  <extension target="org.nuxeo.ecm.directory.sql.SQLDirectoryFactory"
    point="directories">
    <directory name="sqlUserDirectory">
      <schema>user</schema>
      <dataSource>jdbc/nxsqldirectory</dataSource>
	
	<table>users</table>
	      <idField>username</idField>
	      <passwordField>password</passwordField>
	      <passwordHashAlgorithm>SSHA</passwordHashAlgorithm>
	      
	      <fieldMapping name="contributors">contributors</fieldMapping>
	      <fieldMapping name="comments">comments</fieldMapping>
	      
	      <autoincrementIdField>false</autoincrementIdField>
	      <computeMultiTenantId>false</computeMultiTenantId>
	      <dataFile>users.csv</dataFile>
	      <createTablePolicy>on_missing_columns</createTablePolicy>
	      <querySizeLimit>50</querySizeLimit>
	      <references>
	        <inverseReference field="groups" directory="sqlGroupDirectory"
	          dualReferenceField="members" />
	      </references>
	    </directory>
	    <directory name="sqlGroupDirectory">
	      <schema>group</schema>
	      <dataSource>jdbc/nxsqldirectory</dataSource>
	
	<table>groups</table>
	      <idField>groupname</idField>
	      <dataFile>groups.csv</dataFile>
	      <createTablePolicy>on_missing_columns</createTablePolicy>
	      <autoincrementIdField>false</autoincrementIdField>
	      <!-- Add 10 min cache to avoid refetching the groups during login -->
	      <cacheTimeout>360</cacheTimeout>
	      <cacheMaxSize>1000</cacheMaxSize>
	      <references>
	        <tableReference field="members" directory="multiUserDirectory"
	          table="user2group" sourceColumn="groupId" targetColumn="userId" schema="user2group"
	          dataFile="user2group.csv" />
	        <tableReference field="subGroups" directory="sqlGroupDirectory"
	          table="group2group" sourceColumn="parentGroupId"
	          targetColumn="childGroupId" schema="group2group" />
	        <inverseReference field="parentGroups" directory="sqlGroupDirectory"
	          dualReferenceField="subGroups" />
	      </references>
	    </directory>
	  </extension>

	<extension target="org.nuxeo.usermapper.service.UserMapperComponent" point="mapper">
	
	  <mapper name="fv" type="js">
	    <mapperScript>
            searchAttributes.put("username", userObject.username);
	        userAttributes.put("username", userObject.username);
	        userAttributes.put("email", userObject.email);
	        userAttributes.put("firstName", userObject.firstName);
	        userAttributes.put("lastName", userObject.lastName);
	        userAttributes.put("comments", userObject.comments);
	        userAttributes.put("contributors", userObject.contributors);
	    </mapperScript>
	  </mapper>
{'fraction_non_alphanumeric': 0.12304452466907341, 'fraction_numerical': 0.0048134777376654635, 'mean_word_length': 3.8997789240972733, 'pattern_counts': {'":': 0, '<': 170, '<?xml version=': 0, '>': 170, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6082531', 'n_tokens_mistral': 1955, 'n_tokens_neox': 1826, 'n_words': 228}