Problem populating selectone.ftl control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2017 10:22 AM
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?
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2017 01:11 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2017 01:09 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2017 09:25 PM
Hello.
You can find a sample here alvex-masterdata/MasterDataConstraint.java at master · ITDSystems/alvex-masterdata · GitHub
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2017 11:27 AM
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.
