cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide Assistance Panel for all non-admin users

sara_gangale
Champ in-the-making
Champ in-the-making
Hi everyone,
I'm trying to limit permission for all non-admin users. So far I managed to prevent non-admin users from creating new sites, the link is still there but when the user fills in the form and clicks OK he receives a permission denied message.
I'd like to go further and automatically hide all the assistance panel for all users, old and newly created, in order not to show them something they'll surely click and ask me "why doesn't it work?" Smiley Happy

I think (but I can be wrong" that I have to work on presets.xml file, I read somewhere that I have to get rid of all instances of "dynamic-welcome" urls, I tried but nothing changes. I simply edited the file, commenting out all the components regarding dynamic-welcome, I saved the file and restarted Tomcat.

What am I doing wwong? Can someone put me in the right direction?
Thanks
11 REPLIES 11

hgindl
Champ in-the-making
Champ in-the-making

sara_gangale
Champ in-the-making
Champ in-the-making
thanks!
I found that yesterday, and it works perfectly Smiley Happy
now I have to hide the create site link from the drop-down menu for all the non-admin users… any idea?
I don't know why this feature is not embedded… is it normal for all alfresco users to create new sites without any control?
thanks again!

hgindl
Champ in-the-making
Champ in-the-making
i think a good starting point for that would be

http://docs.alfresco.com/5.0/tasks/dev-extensions-share-tutorials-custom-header-menu-item-removal.ht...

or

http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/

In part 3 of this tutorial dave draper shows how to do it

additionally you have to customize the my-sites.get.js in tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets , set model.showCreateSite only if user.isAdmin

sara_gangale
Champ in-the-making
Champ in-the-making
First of all, i'm not a developer I'm a system engineer so I'm kinda lost in this things Smiley Happy
I managed to create a new jar following the directions in the alfresco documentation, but I don't know how to modify the my-sites.get.js, if I simply edit it using notepad++ I receive a lot of errors after alfresco restart…
If I try to open the js file using Eclipse instead, it throws me another error (model is undefined)
I'm stuck, can you please help?
Thanks again

hgindl
Champ in-the-making
Champ in-the-making
its as easy as

1) navigate to (create if folder not exists)
tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\dashlets

2.) copy my-sites.get.js from tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets to tomcat\shared\classes\alfresco\web-extension\site-webscripts\org\alfresco\components\dashlets

3.) modify code in my-sites.get.js from
model.showCreateSite = true;
to
model.showCreateSite = user.isAdmin;


restart or reload share webscripts

check using admin account and normal account

angelborroy
Community Manager Community Manager
Community Manager
You can do it by extending Alfresco rather than overwriting. This can help https://github.com/keensoft/alfresco-summit-2014/tree/master/10-enhancements/09-hide-create-site
Hyland Developer Evangelist

hey, thanks for your useful answer.
I don't know how to install all those files: in the chapter "installation" they talk about amp and amp_share, and a script to run ro install them. But there are no .amp files to install, so what do I have to do? I thought I had to copy the files into the specifies directories (keeping the structure as seen in the link) but most of the folders are missing in my installation…
Sorry for the stupid question but again I'm a total newbie (but I want to learn Smiley Happy )

hgindl
Champ in-the-making
Champ in-the-making
thats the best way

sara_gangale
Champ in-the-making
Champ in-the-making
I tried to parse the share project using apache maven but I receive this error:

C:\Users\Administrator\Desktop\hide_create_site>mvn
[INFO] Scanning for projects…
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project  (C:\Users\Administrator\Desktop\hide_create_site\pom.xml)
has 1 error
[ERROR]     Non-parseable POM C:\Users\Administrator\Desktop\hide_create_site\po
m.xml: Expected root element 'project' but found 'html' (position: START_TAG see
n …<!DOCTYPE html>\n<html lang="en" class="">… @6:26)  @ line 6, column 26 -
> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseExce
ption

can somebody help? thanks
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.