Skip to content

An Alfresco add-on that limits site creation to those in a specific group. For Alfresco 5.0.d use the code in the 5.0.d branch.

License

Notifications You must be signed in to change notification settings

angelborroy/share-site-creators

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

share-site-creators

This add-on gives you the ability to restrict Alfresco Share site creation to a specific group of users. Users not in the group will not see a "Create Site" link in:

  • The header Sites dropdown menu
  • The My Sites dashlet
  • The "welcome" dashlet

In addition, for users not in the group, the "welcome" dashlet's text changes to explain what a Share site is but does not imply that they have the ability to create one. A nice enhancement might be a link that launches a workflow to request a new site. (Pull requests welcome!)

By default, the group the module looks for must have an ID of "GROUP_SITE_CREATORS". The display name can be anything. When you create the group you do not specify "GROUP_"--Alfresco will prepend that for you.

This add-on also changes the low-level permissions so that even if someone figures out how to create a site without the user interface, the repository tier won't let them do that unless they are in the group.

Installation

There are two AMPs associated with this add-on. One is a "repo tier" AMP and the other is a "Share tier" AMP.

For each of the two projects, use mvn install to create the AMP. By default the POM is set to depend on the latest stable Alfresco Community Edition version which is 4.2.f. This will not work with 5.0.x. If you want to use this with 5.0.d use the code in the 5.0.d branch. This has not been tested with Enterprise Edition.

Install the AMPs

You can install the AMPs as you normally would using the MMT. For example, to install on a server, you would copy share-site-creators-repo.amp to $ALFRESCO_HOME/amps and copy share-site-creators-share.amp to $ALFRESCO_HOME/amps_share, then run bin/apply_amps.sh.

For developers looking to contribute who are running locally, you can use the Maven plug-in to install the AMP by running mvn alfresco:install -Dmaven.alfresco.warLocation=$TOMCAT_HOME/webapps/alfresco for the repo AMP and mvn alfresco:install -Dmaven.alfresco.warLocation=$TOMCAT_HOME/webapps/share for the Share AMP. If you are not running your Alfresco and Share WARs expanded specify the WAR file path instead of the directory.

Once the AMPs are deployed, start up Alfresco.

Deploy the Module in Share

After starting Alfresco with the AMPs deployed, you'll need to go to the Share Module Deployment Console to deploy the module. After you hit "Apply Changes", log out, then log back in. If you don't already have a group created with your username in it, the "Create Site" links should be gone, even if you are an administrator.

Create and Populate the Group

Now go create a new group with an ID of "GROUP_SITE_CREATORS". You can add individuals and groups to this group. For example, at the very least you will probably want to add ALFRESCO_ADMINISTRATORS to this group.

Using a Different Group Name

If you want to use a different group it needs to be changed in two places. First, in the repo project, change src/main/amp/config/alfresco/module/share-site-creators-repo/context/service-context.xml. Do a search for "GROUP_SITE_CREATORS" and you'll find it.

Second, you can either change the group when you deploy the module, or in the Share tier project, change the evaluator declaration in src/main/amp/config/alfresco/web-extension/site-data/site-creators-module-extension.xml.

About

An Alfresco add-on that limits site creation to those in a specific group. For Alfresco 5.0.d use the code in the 5.0.d branch.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%