cancel
Showing results for 
Search instead for 
Did you mean: 

Authority property - List of groups and users

nancygaillard
Champ on-the-rise
Champ on-the-rise
Hi everybody,

(Alfresco 4.2.e on a Windows 7 x64bits)

I created a custom type "Mail" which has an association named "ctListMailExp" with the type "Person" which enables to indicate the sender(s) of a mail.

I would like (if it is possible) use my association to indicate one or more groups and/or users.
To list my groups and users, I use the template "Authority" like this :

in share-config-custom.xml

<field id="fac:ctListMailExp">
   <control template="/org/alfresco/components/form/controls/authority.ftl" >
      <control-param name="startLocation"></control-param>
      <control-param name="authorityType">ALL</control-param>
      <control-param name="deepSearch">true</control-param>
   </control>
</field>


My main problem is that I can't see the groups when I search them. (I can only see the users).
My second problem is I can't see directly a list of groups or users. (I have to search).

Is it possible to list in the same interface groups and users?

Nancy
6 REPLIES 6

scouil
Star Contributor
Star Contributor
Hi,

First of all, I don't think your param are valid for the authority.ftl template:
https://wiki.alfresco.com/wiki/Forms#authority.ftl
And as listed this should automatically detect your target type and search for those.
So maybe make sure that in your model, fac:ctListMailExp is an association where the target is a cm:authority and not a cmSmiley Tongueerson

For your second point it's tricky and I don't think it's supported by the authority.ftl template.
So maybe you could try emulating by using the association.ftl template (https://wiki.alfresco.com/wiki/Forms#association.ftl) and parameter the startLocation with "/sys:system/sys:authorities".
I've never tried it so no guaranties it works. And even if it does, any future upgrade might potentially break it.
If keeping that in mind you decide to go for it, please come back and post your results that's actually quite interesting.

nancygaillard
Champ on-the-rise
Champ on-the-rise
Thank you!
When I have replaced the "cmSmiley Tongueerson" by "cm:authority" and I can see groups and users now…
For the template used, I am going to try that you said me

nancygaillard
Champ on-the-rise
Champ on-the-rise
IT doesn't work

scouil
Star Contributor
Star Contributor
Yes I was hoping it would work but didn't really have high hopes.
I'd say the problem is that the itemfamilly is hardcoded in the current form templates available.
itemFamily: "authority"
is the one used in authority.ftl while
itemFamily: "node"
is the one used in association.ftl
Then I'd say that you would need be to write your own form component wrapping the picker and make it half way between association.ftl and authority.ftl

nancygaillard
Champ on-the-rise
Champ on-the-rise
I understand now Smiley Happy
Let me see how can I do that I'll come back.

curtis
Champ in-the-making
Champ in-the-making
Hi,

Did you solved you problem ? I'm in same situation and didn't found any solution.

Thanks,