cancel
Showing results for 
Search instead for 
Did you mean: 

How to Block 'Create Site' in Share?

mimarox
Champ in-the-making
Champ in-the-making
In my company only the administrator should be able to create new sites as project homes assigning the respective project leader as the site's owner in Share. No other user should be able to create a new site.

After searching for quite a while I was still unable to find out how to remove the links and menu entry 'Create Site' for everybody except the administrator. Is this possible at all? How do I have to go about it?

Thanks for helping. 🙂
5 REPLIES 5

hailpam
Champ in-the-making
Champ in-the-making
Hi mimarox,

try to modify the header component (FTL) that you can find at <alf_installation_path>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\header. You can hide the site management features simply using the parameter isGuest in the FTL if-instruction.

Regards,

–Paolo

mattyc
Champ in-the-making
Champ in-the-making
What if you are already in a site, is there anyway to eliminate Customise Site Options from the page and from the MORE list box in the top right?

mattyc
Champ in-the-making
Champ in-the-making
Ok I figured out how to hide the Customise Site option on the Sites Dashboard by commenting out the following.

File: org/alfresco/components/dashlets/site-welcome.get.html.ftl    

 
div class="detail-list-item last-item">         <h4 class="theme-color-1">${msg("header.customiseSite")}</h4>         <div>${msg("text.customiseSite")}</div>         <div><a href="${url.context}/page/site/${page.url.templateArgs.site!}/customise-site" class="theme-color-1">${msg("link.customiseSite")}</a></div>      </div>        ‍‍‍‍‍‍

hailpam
Champ in-the-making
Champ in-the-making
MattyC,

you can identify the HTML element for which you would apply the restrictions and insert an FTL condition such as:
<#if isAdmin>   <div id=… > … </div></#if>‍‍‍‍‍

at this moment, I don't remember exactly the model variable to distinguish the administrator from an ordinary user, but you can find it simply analyzing the code.

Regards,

–Paolo

pamolendijk
Champ in-the-making
Champ in-the-making
An simple solution to block Create Site:

1. Login with admin to the Explorer client.
2. Navigate to the "Sites" space.
3. Look at the authorization and change the role of Everyone to consumer.
4. Create a Share admins group and give it the appropriate permissions on this Sites space so they can create sites.
5. Add your Share admin users to this group
5. done.

Now if some without permission (everyone not in Share admin group) does try to create a Share site they get an error that access is denied.

Have fun,

Peter A. Molendijk