AnsweredAssumed Answered

people.getPeople and search over person permission problem

Question asked by ottopodo on Nov 3, 2010
Latest reply on Nov 3, 2010 by ottopodo
I tried to access people.getPeople result in repository/person/people.get.js and I could not read it or change it. I asked for help trying to understand how to read and change people.getPeople results.
I received no answers.
So I finally decided to create a custom controller called mypeople.get.js.
I replaced the people.getPeople function with the following lucenesearch:
var peopleCollection = search.luceneSearch("TYPE:\"{}person\" "+
"+ ((@cm\\:userName:" + filter + "* OR @cm\\:userName:\"" + filter + "\") OR (@cm\\:firstName:" + filter + "* OR @cm\\:firstName:\"" + filter + "\") OR (@cm\\:lastName:" + filter + "* OR @cm\\:lastName:\"" + filter + "\")) "+
" AND NOT (@cm\\:userName:\"" +["cm:userName"] + "\") ");

Now I can read and modify peopleCollection.
Unfortunately I obtain the following permission error when I search a person from people-finder with a non administrator user:
Failed to execute script 'classpath*:alfresco/extension/templates/webscripts/org/alfresco/repository/person/mypeople.get.js': 10030029 Access Denied. You do not have the appropriate permissions to perform this operation.

Is there a limitation with search over  {}person ?
How can I let all users access this search?
After one week I'm still looking for a solution and looking for an answer.
Rather unusual for an open source community.