set password auto expiration

cancel
Showing results for 
Search instead for 
Did you mean: 
afaust
Master

Re: set password auto expiration

Jump to solution

Unfortunately, none of these files show how the password expiration JS is being registered / triggered. So far, nothing provides any clues to what kind of OnCreateNode behaviour is being triggered or what the specific error is in that case. Judging from the Alfresco source code of TransactionBehaviourQueue, you should have way more information in the log than you have provided so far, so maybe if you could also provide the full alfresco.log for that error, it could help.

I am curious: How is that password expiration notification JS working, I mean doing the search.luceneSearch() on the Alfresco user store, when it is not indexed by default? Did you add extra cores to SOLR for that? Also, luceneSearch is a very old-school, legacy way to search and has not received any optimsiations since 4.0. Furthermore, processing ALL users in one JS action is quite a massive job - what if the process fails for a single user? Does it start over again, and send duplicate mails to all the users that have already been processed? You may also overwhelm the caches by processing too many users in a single transaction.

monicakumari
Established Member

Re: set password auto expiration

Jump to solution

The javascript file is running using scheduler(attached). currently javascript is working fine. I have tested multiple times with three users. the only issue is when the scheduler triggers, the onCreateNode behaviour(GenerateNewUsersMail.java) triggers automatically, which should not. This is not creating any impact but I think It may create issue in future.

thanks.

monicakumari
Established Member

Re: set password auto expiration

Jump to solution

Hello Axel,

you were correct. I was able to do it with sdk 2.2, but not able to search user properties (prefix : usr) with latest sdk.

I am getting exceptions :

         Failed to execute search: @usr\:username:*

         Caused by: org.alfresco.repo.search.impl.lucene.LuceneQueryParserException: 00240096 No solr query support for store user://alfrescoUserStore

could you please help me with the other way to search users instead of search.luceneSearch("user://alfrescoUserStore", "@usr\\:username:\*");

I need the user properties from user node.

Thanks.

monicakumari
Established Member

Re: set password auto expiration

Jump to solution

this worked..

var userNodeQuery = "TYPE:\"usr:user\"";
	var userNodeQueryDef = {
		       query: userNodeQuery ,
		       language: "fts-alfresco" ,
			   store: "user://alfrescoUserStore"
		};
	
	userNodes = search.query(userNodeQueryDef);
shivananda_L
Member II

Re: set password auto expiration

Jump to solution

"Good day.

I am interested in implementing a feature for password auto-expiration within Alfresco.


@monicakumari wrote:

this worked..

var userNodeQuery = "TYPE:\"usr:user\"";
	var userNodeQueryDef = {
		       query: userNodeQuery ,
		       language: "fts-alfresco" ,
			   store: "user://alfrescoUserStore"
		};
	
	userNodes = search.query(userNodeQueryDef);

This feature would prompt users to change their passwords after a period of 60 days. Could you please provide guidance on how to implement this functionality?

Thank you