cancel
Showing results for 
Search instead for 
Did you mean: 

control of available types in share UI and advanced search UI

jservajean
Confirmed Champ
Confirmed Champ
I've defined many different content models inside the same alfresco instance.
Now users can change the types of the documents with the newly creadted types. They also have many new customs search forms in the "advanced search" menu.

Now my questions are :
- is it possible to control the visibility/availability of these custom "change type"/"advanced search" items, because many users want to see only the types they can work on/search for ??
- is their a way to reduce type availability to a certain "scope" (a site or a folder) or even to a group/authority ?

Thanks for helping
2 REPLIES 2

scouil
Star Contributor
Star Contributor
Hi,

There's nothing that I know of out of the box.
But then the wonders of opensource make it so that you can build it yourself.

The easiest specialize-type restriction to implement would be the one based on the user. And it would only remove it from the share UI. Not block it at the background level.
The way I'd do it would be to add an optional attribute in the config where you declare your folders.
You'll then be able to define your models visibility this way:

<config evaluator="string-compare" condition="DocumentLibrary">
<types>
<type name="custom:groupAType" visible="GROUP_groupA" />
<type name="custom:groupBType" visible="GROUP_groupB" />
</types>
</config>


Then you'll need to extend both of the files that retrieves it to actually take that attribute in consideration.
That would be
change-type.get.js
config.lib.js
(It actually depends on your Alfresco version)

For the location-dependant specialise-type restriction, you'll also need to extend some client-side stuff because to retrieve the subtypes it currently only pass the current type, and not the current nodeRef.

jservajean
Confirmed Champ
Confirmed Champ
Thanks for the clue !
I'll try something like that