cancel
Showing results for 
Search instead for 
Did you mean: 

Hide the Create Site option in Alfresco 5.0.b

hsturner
Champ on-the-rise
Champ on-the-rise
Hi we had the Create Site option hidden for all users except administrators in in 4.2.d, When I try to hide the create site in the Sites Drop down and the my sites widget in 5.0.b it is visible and also throws a exception error for my-sites.get.html.ftl when alfresco loads. Also I cannot find the public-services-security-context.xml file to restrict site creation to admins only. 

How do I do this in 5.0.b, or is there a way to restrict site cretion to admins and a special site creators group?
12 REPLIES 12

deeps
Champ in-the-making
Champ in-the-making
Hi all,
I have written one js for creating automatic groups in alfresco. and i am executing that js while Folder or market is created by site manager. and in this case its not creating group.
but when i am executing that js while folder is created by admin, then it executes properly, and also creates group automatically.
So whats wrong with site manager???
i have given coordinator rights for site manager, and its highest right.
can any one help me??
i am using alfresco "5.0 d community"
please reply.
Thanks in advance
I am using below code in js-
var logFile2 = space.childByNamePath("logs.txt");
if (logFile2 == null)
{ logFile2 = space.createFile("logs.txt"); }
logFile2.content = "Script execution Started\n";
logFile2.content+="Folder Name="+space.properties.name;
var nodes=space.childFileFolders();
try{
for(var n in nodes){   
var nodeReference=nodes[n].nodeRef;
//logFile2.content+="\n\n"n" "nodes[n].name" "+nodeReference;
var foundNode = search.findNode(nodeReference);
try{
if(foundNode.isContainer){
logFile2.content+="\n\n"n" "nodes[n].name" "+nodeReference;
var parentGroup = groups.getGroup("grp_pf_all_users");
var grp_name="grp_pf_"+foundNode.properties.name;
var readGroup = groups.getGroup(grp_name.toLowerCase()+"_read"); //groups.getGroup returns ScriptGroup
if(readGroup==null)
{ //readGroup= parentGroup.createGroup(grp_name.toLowerCase()+"_read",grp_name.toLowerCase()+"_read"); }
var writeGroup = groups.getGroup(grp_name.toLowerCase()+"_write"); //groups.getGroup returns ScriptGroup
if(writeGroup==null)
{ //writeGroup=parentGroup.createGroup(grp_name.toLowerCase()+"_write",grp_name.toLowerCase()+"_write"); }
}
}catch(err)
{ logFile2.content+= "\nError to add user read group "+err ; }
}
}catch(err)
{ logFile2.content+= "\nError to add user read group "+err ; }

parashiftaustra
Confirmed Champ
Confirmed Champ
Hi All,
Parashift have created a Para Module to this solution. Have a look here: https://www.parashift.com.au/site-restrictions/

aryasankar
Champ in-the-making
Champ in-the-making
Hello,

I am trying to do site creation in alfresco 5.0d,
Downloaded alfresco-shell-tools into /usr/local/share/ path and have got alfCreateSite.sh inside bin/ folder

But while executing ./alfCreateSite.sh 'Mysite' , getting error as below
./alfCreateSite.sh: line 104: jshon: command not found
curl: (6) Couldn't resolve host 'Path='

So I have downloaded  jshon from http://kmkeen.com/jshon/. And inside that I have got 3 files
jshon.1
jshon.c
Makefile

How can I proceed on json installation and after how can I proceed on site creation using alfCreateSite.sh

Please kindly update me.

Regards,
Arya