10-07-2017 07:43 AM
I have created a behaviour class NewUserEmail.java to auto generate an email with username and password while creating a new user mannualy and It is working fine. but this behaviour is automatically calls when I am creating multiple users by uploading CSV file. so users are getting two autogenerated mails - one is by default and another from that behaviour. now , I am trying to override the class UserCSVUploadPost so that I can remove the default behaviour of sending the mails while creating multiple users by uploading CSV file.
please guide me what to do, so that I can remove the default behaviour of sending the mails while uploading CSV file to create multiple users.
thanks in advance.
10-10-2017 04:50 AM
To override Out Of The Box WebScripts you will probably need to place your <some>-context.xml file in the extensions directory not in the module directory, otherwise your bean will get overridden by alfresco's defaults.
10-10-2017 04:50 AM
To override Out Of The Box WebScripts you will probably need to place your <some>-context.xml file in the extensions directory not in the module directory, otherwise your bean will get overridden by alfresco's defaults.
10-10-2017 04:56 AM
yes. I have created custom-context.xml file inside extensions directory having content :
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<import resource="classpath*:alfresco/module/*/module-webscripts-context.xml" />
<bean id="webscript.org.alfresco.repository.person.user-csv-upload.post"
class="com.eisenvault.mailTest.CustomUserBulkUpload" parent="webscript">
<property name="authenticationService" ref="AuthenticationService" />
<property name="authorityService" ref="AuthorityService" />
<property name="personService" ref="PersonService" />
<property name="tenantService" ref="tenantService" />
<property name="dictionaryService" ref="DictionaryService" />
<property name="transactionHelper" ref="web.retryingTransactionHelper" />
</bean>
</beans>
10-10-2017 04:59 AM
but its not working. I want to create multiple users by uploading CSV but dont want to send emails to the users. this is what I am trying to do. do you have any idea how to stop those mails.?
10-10-2017 05:04 AM
Try renaming the file to custom-web-context.xml, not sure if you should keep the import statement though.
10-10-2017 05:45 AM
thank you so much for your help. its working now with custom-web-context.xml. can you please help me to understand, why alfresco is working with this file name and how ?
and Is there any other way to override webscripts ?
thank you.
10-10-2017 05:59 AM
The main web application context loads in this order :
You should then use a file from this classpath location "classpath*:alfresco/extension/custom-web-context.xml" to override OOTB webscripts.
10-10-2017 07:37 AM
Extend/Override Users.js, which is located inside Share/Components/console.
Inside that file there is one function named as onUploadUsersClick
Inside this function replace below line
uploadURL: "api/people/upload.html",
With
uploadURL: "api/people/upload.html?email=false",
Above change will solve your issue.
10-10-2017 08:06 AM
I want to hide the "password" and "verify password" fields on UI of creating new user. I think it must be some .html.ftl file. but I am not able to file the exact name of the file. do you have any idea about the file name ?
10-10-2017 08:17 AM
That's a different question, you should start a new thread for it.
Explore our Alfresco products with the links below. Use labels to filter content by product module.