Code Monkey home page Code Monkey logo

collective.workspace's Introduction

image

collective.workspace

Introduction

collective.workspace package for providing 'membership' in specific areas of a Plone Site.

It allows you to grant people access to areas of content using a membership group rather than local roles for each user, and to delegate control over that group to people who don't have access to the site-wide user/group control panel.

collective.workspace provides a behavior that can be enabled for any Dexterity content type. When enabled, it adds a "Roster" tab which is where you can manage the team.

All the functionality takes place via an IWorkspace adapter, which can be overridden to specify:

  • A list of groups, and the roles that each group should receive. These groups are created automatically via a PAS plugin, and automatically granted local roles using a borg.localrole adapter.
  • The schema for which fields should be stored for each member in the roster. This includes checkboxes for the groups, to determine which groups the member is in.
  • Action links for each row in the roster. The default is an "Edit" link which brings up a popup to edit the fields for that person's roster membership.
  • Action buttons at the bottom of the roster which apply to the rows the user selects. An example of this could be a 'Send email' action, so a roster admin can easily email users in the roster.

Unlike similar previous packages (see slc.teamfolder and collective.local.*), collective.workspace supplies its own PAS groups plugin, instead of using standard Plone groups. This means that you can prevent Workspace-specific groups from appearing in the sitewide group control panel.

Some other features are:

  • Membership in a roster is indexed, so you can search the catalog for items of portal_type X that have a particular user in their roster.
  • Events are fired when roster memberships are added/modified/removed.

Basic Installation

  • Add collective.workspace to your buildout eggs.
  • Install collective.workspace in the 'Add-ons' section of Plone's Site Setup.
  • Enable the behaviour on your dexterity content type (Either using GenericSetup or Site Setup -> Dexterity Content Types).

Custom Workspace Groups

The default groups available on a workspace are 'Guests', 'Members', and 'Admins'. You can customise the groups that are available and the default permissions they are given by adding a custom IWorkspace adapter:

configure.zcml

<adapter
   for="mypackage.MyContentType"
   provides="collective.workspace.interfaces.IWorkspace"
   factory=".adapters.MyWorkspace"
   />

adapters.py

from collective.workspace.workspace import Workspace

class MyWorkspace(Workspace):
    """
    A custom workspace behaviour, based on collective.workspace
    """
    # A list of groups to which team members can be assigned.
    # Maps group name -> roles
    available_groups = {
        u'Supervillains': ('Reader', ),
        u'Superheroes': ('Reader', 'Contributor', 'Reviewer', 'Editor',),
    }

collective.workspace's People

Contributors

ale-rt avatar cillianderoiste avatar davisagli avatar gyst avatar mattss avatar pgrunewald avatar pysailor avatar

Watchers

 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.