cancel
Showing results for 
Search instead for 
Did you mean: 

Problem populating selectone.ftl control

alexnaranjo85
Champ in-the-making
Champ in-the-making

Hi Alfresco community. I'm working on a project and i need to populate a selectone with a contact list from repository. The contact list depent of current logged user group. I created a data webscript in order to get contact list but when i try to get currently share logged user i always get admin. What is the best way to get contact list based on share logged user's role?

4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator

Did you by any chance define your web script as "runAs" with the user admin? Only that would explain "always" getting the logged-in user as "admin" (except if your are always testing as admin of course).

You know that instead of implementing a custom web script, you could also use a registered LIST constraint implementation (Java-based) for the property which dynamically resolves contacts in its implementation of getAllowedValues

alexnaranjo85
Champ in-the-making
Champ in-the-making

Thanks Axel for your reply and sorry for my english. I will make a research

about registered list if you have an example about how to user i will

appreciate it.

My problem is a little more complex. In my project i have a document type

CompanyDoc and a association for it with a user, based on user's group.

Through a action form i need to setup this association not using edit

metadata action because i need to execute more business logic during

association establishment. In action form user need to choose with who user

want to establish the association, this user list should be populated

dynamically based on current logged user group. That is my real situation

any idea would be grateful.