cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring Advanced Search in Alfresco Share Based upon groups

dsr471
Champ on-the-rise
Champ on-the-rise
I've one requirement…

I've two custom types called <blockcode> custom1:doc & custom2:doc </blockcode> And also I've two groups called <blockcode> group1 & group2.</blockcode>

I configured advanced search like below by adding below code in <blockcode>share-config-custom.xml </blockcode>

 <config evaluator="string-compare" condition="AdvancedSearch" replace="true">
<advanced-search>
    <!– Forms for the advanced search type list –>
    <forms>
        <form label="Custom DOC" description="Search for Custom Content">custom1:doc</form>
    </forms>
</advanced-search>
</config>
<config evaluator="model-type" condition="custom1:doc">
<forms>
    <!– Search form –>
    <form id="search">
        <field-visibility>
            <show id="cm:name" />
            <show id="custom1:cus_ID" />
        </field-visibility>
        <appearance>
            <field id="custom1:cus_ID">
                <control template="/org/alfresco/components/form/controls/textfield.ftl" />
            </field>
        </appearance>
    </form>
</forms>
</config> 

Its shows only the <blockcode>Custom1 Doc </blockcode> in Look for dropdown  for all users

Now my requirement is,

–>If user from <blockcode>group1</blockcode> login & navigates the advanced search page ,he should get only <blockcode>custom1:doc</blockcode> in Look for dropdown .

–>If user from <blockcode>group2</blockcode> login & navigates the advanced search page,he should get only <blockcode>custom2:doc </blockcode>in Look for dropdown .

How to achieve this.. Need Help guys.
4 REPLIES 4

gwad
Champ in-the-making
Champ in-the-making
This is a question that I too want to know.

How do we change the 'Look For' drop down in the advanced search screen dynamically? Basically it should filter the drop down based on the logged-in user group.

Thanks.

gwad
Champ in-the-making
Champ in-the-making
If you ask a question here you may get a reply in the next 5 years. That is the main problem with these forums.

gwad
Champ in-the-making
Champ in-the-making
This question was posted on October 2015 and 6 months later there is still no reply. Shocking that this is Alfresco forums. And the question is definitely a very genuine one. Shocking.

douglascrp
World-Class Innovator
World-Class Innovator
For those kind of configuration, you have to use the extension modules feature with the group evaluator.

The documentation for this is here http://docs.alfresco.com/5.0/concepts/dev-extensions-share-surf-extension-modules.html

Specifically, what you need is the dynamic configuration, described here http://docs.alfresco.com/5.0/concepts/dev-extensions-share-module-dynamic-configuration.html

You can rely on this blog post to get a sample code using the <evaluator type="group.module.evaluator">
https://angelborroy.wordpress.com/2015/06/03/alfresco-customizing-actions-and-document-details-by-us...

A combination of all those will allow you to implement your requirement.

PS: It is not a good idea to criticize people from who you are willing to get help. No one is making money from answering questions here… everybody does that using their free time.
If you need quick support, you should considering buying from Alfresco or a consultant/partner.