Hello dude.
Yes, in this answer https://community.alfresco.com/message/816593-re-personalizar-share-header-aikau-para-el-rol-siteman...
I do not recall this evaluator. Might be a mistake somewhere. Here is what we try to do for our proof-of-concept:
An Alfresco Share site represents a project. We have more than one projects running in the same time
The company has few departments, 4 of them are doing specific project related works, 3 of them are support departments
The teams in each department are assigned to different projects, and with different roles. In one project User A can be a manager (or responsable) while the same person can be a simple user of content in the other project. Because of this, I was thinking to use user role assignment per site/folder to show/hide the different actions. A user can have one of the three - manager, contributor, user - role. Since we try to use Alfresco to manage certain type of engineering documentation and our processes (the next step is Activiti process development/implementation) are rather specific, we were able to create action groups (from document browser, document details view) for each of the three available roles. The goal is to avoid confusion and to make sure that the system is simple enough for the users. If not, they wont use it!
I tried to use an evaluator to check the user role (isSiteManager, isSiteConsumer, etc) and use the disableAction in case the evaluator returns True. Unfortunately this was not working.
The easiest solution would be to remove the unnecessary actions for all the users. But we voted against this solution.
Hope it makes things a bit more clear.
Regards,
Zsolt Putnoky
Below a simple guide to implement such a feature.
1 - Create three different modules at https://github.com/keensoft/alfresco-simplify-share/blob/master/simplify-share/src/main/amp/config/a... including an evaluator for each one
<evaluator type="site.module.evaluator">
<params>
<sites>.*</sites>
<applyForNonSites>false</applyForNonSites>
<groups>SiteCollaborator</groups>
<groupsRelation>OR</groupsRelation>
</params>
</evaluator>
2 - Include for every module desired actions at https://github.com/keensoft/alfresco-simplify-share/blob/master/simplify-share/src/main/amp/config/a...
<actionGroup id="document-browse">
<action index="100" id="document-download" appendEvaluators="true">
<evaluator>evaluator.doclib.action.DocumentEnableInSmartFolder</evaluator>
</action>
<action index="110" id="document-view-content" appendEvaluators="true">
<evaluator>evaluator.doclib.action.DocumentEnableInSmartFolder</evaluator>
</action>
<action index="120" id="document-locate" appendEvaluators="true">
<evaluator>evaluator.doclib.action.DocumentEnableInSmartFolder</evaluator>
</action>
</actionGroup>
...
3 - Create three different modules at https://github.com/keensoft/alfresco-simplify-share/blob/master/simplify-share/src/main/amp/config/a... including an evaluator for each one
<evaluator type="site.module.evaluator">
<params>
<sites>.*</sites>
<applyForNonSites>false</applyForNonSites>
<groups>SiteCollaborator</groups>
<groupsRelation>OR</groupsRelation>
</params>
</evaluator>
4 - Select which components are you rendering for every module at section https://github.com/keensoft/alfresco-simplify-share/blob/master/simplify-share/src/main/amp/config/a...
5 - Identify other conditions to render or not regions at https://github.com/keensoft/alfresco-simplify-share/blob/master/simplify-share/src/main/amp/config/a...
I understand your requirement and I hope you understand how to implement it easily with this instructions.
Thanks alot! I think I start to understand it. time to print and read it on the train
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.