Coder Social home page Coder Social logo

flox1an / share-site-creators Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jpotts/share-site-creators

0.0 2.0 0.0 90 KB

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: Apache License 2.0

JavaScript 100.00%

share-site-creators's Introduction

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.

share-site-creators's People

Contributors

jpotts avatar

Watchers

Florian avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.