Disable custom extension module for consumer users
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2015 08:12 AM
Hi I want to disable custom extension module for consumer users . Is it possible to hide it only for consumers.
any place in above code where i can put some entry to do this????
any place in above code where i can put some entry to do this????
Labels:
- Labels:
-
Archive
screen_0.png
38 KB
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2015 04:50 AM
You can add module level evaluator as below
<extension> <modules> <module> <id>Hide add external user</id> <evaluator type="site.module.evaluator"> <params> <sites>.*</sites> <groups>SiteConsumer</groups> </params> </evaluator> <auto-deploy>true</auto-deploy> <components> <component> <region-id>addemail</region-id> <source-id>invite</source-id> <scope>template</scope> <sub-components> <sub-component id="default"> <evaluations> <evaluation id="guaranteedToHide"> <render>false</render> </evaluation> </evaluations> </sub-component> </sub-components> </component> </components> </module> </modules></extension>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-10-2015 05:20 AM
Hi raghav,
You probably have the wrong forum for this, as this forum is for end user Share questions, rather than customisations.
In any case, if you want behaviour like this you need to design and build it into your customisation so that your extension doesn't have any impact on users with the consumer role. Doing this will depend completely on what your extension is doing (e.g. is it Share only, or also contain Alfresco extension elements like behaviours or actions etc).
E.g. if your extension is a just a basic Surf Extension module you can use techniques like these http://docs.alfresco.com/5.0/tasks/dev-extensions-share-tutorials-subcomponent-evals.html to define (or resuse) evalustors that determine when the extension comes into effect.
Otherwise you can build the logic into your extension itself to determine whether to show it or not using techniques similar to those used by the evalutor - just bear in mind performance when you are doing this if you need to do calls back to Alfresco (you don't want want each item in a document library making a call to Alfresco to determine whether or not to show an action for example)
Regards
Steven
You probably have the wrong forum for this, as this forum is for end user Share questions, rather than customisations.
In any case, if you want behaviour like this you need to design and build it into your customisation so that your extension doesn't have any impact on users with the consumer role. Doing this will depend completely on what your extension is doing (e.g. is it Share only, or also contain Alfresco extension elements like behaviours or actions etc).
E.g. if your extension is a just a basic Surf Extension module you can use techniques like these http://docs.alfresco.com/5.0/tasks/dev-extensions-share-tutorials-subcomponent-evals.html to define (or resuse) evalustors that determine when the extension comes into effect.
Otherwise you can build the logic into your extension itself to determine whether to show it or not using techniques similar to those used by the evalutor - just bear in mind performance when you are doing this if you need to do calls back to Alfresco (you don't want want each item in a document library making a call to Alfresco to determine whether or not to show an action for example)
Regards
Steven
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2015 04:17 AM
Thanks Niketa,
but after implementing your code iam not able to see the extension module either for admin or non admin users. Please assist me to accomplish my task
but after implementing your code iam not able to see the extension module either for admin or non admin users. Please assist me to accomplish my task
