I've a problem that I want to share with all of you (more experts than me on Alfresco Share technology).
I'm implementing a password expiration mechanism (not native for Share). I'm consulting the spacestore USR, where all the user node are stored. During my development, I've noticed a stange thing: when I execute the query
@usr\:username:"paolo"
form Alfresco environment I obtain 1 result, the right one as my expectations; but, when I execute the same query from Share, recalling an Alfresco WebScript (level of autentication: user) from another of Share, I obtain 0 result opposite to the right result obtained from the same query executed directly from Alfresco WebScript Environment. A similar thing I can obtain also in other circumstances: when I try to change the password, given the noderef of user object from USR spacestore, I obtain from Alfresco a correct password change, but from Share I can not observe the password change beacause it is not done during the transaction.
At this moment, I don't understand why I observe a such phenomenon… Can someone answer me about this doubt?
Are you sure the query is being executed the same way in both cases? You may need to call escape() or encodeURIComponent() when passing parameters between Share and Alfresco.
I looked the behavior of the query exucution directly from the Repo Debugger (activated directly by the share call to repo service), and I've done some controls on string received: I seem that there is no problem concerning the string, but I must try to trim/escape the string.