Skip to main content

Introduction

Allow to define local roles settings by dexterity type.

A new configuration page is added as a new tab on a dexterity type configuration.

A configuration line has the following fields:

  • the state

  • the principal

  • the roles

  • an optional configuration as string, but evaluated as a dict: {‘utility name’: [roles]}. The utility implements ILocalRolesRelatedSearchUtility and get related objects.

You can then define for each state which principal will receive some local roles automatically on the content, and other local roles on related content.

By example:

  • on the “pending” state, the “stephen” user will receive the following role: Reviewer.

  • on the “published” state, the “editors” group will receive the following roles: Editor, Reviewer.

The utility “dexterity.localroles.related_parent” get the object parent and can be used to give local roles on the content parent.

  • on the “pending” state, the “stephen” user will receive on the content parent the role: Reviewer.

Those automaticaly given roles cannot be manually removed by the “sharing” tab (read only, as inherited roles).

This package is a base for dexterity.localrolesfield that adds a field to define the principal.

Installation

  • Add dexterity.localroles to your eggs.

  • Re-run buildout.

  • Done.

Credits

Have an idea? Found a bug? Let us know by opening a ticket.

Tests

This package is tested using Travis CI. The current status of the add-on is :

https://api.travis-ci.org/collective/dexterity.localroles.png https://coveralls.io/repos/collective/dexterity.localroles/badge.svg?branch=master&service=github

Contributors

  • IMIO, Original Author

Changelog

1.6 (2022-07-01)

  • Added ‘rel’ (related) handling in utils.update_roles_in_fti [sgeulette]

  • Added ‘rem’ action in utils.update_roles_in_fti [sgeulette]

  • Added ‘portal_type’ parameter in utils.fti_configuration [sgeulette]

1.5 (2021-08-27)

  • Added update_roles_in_fti method to update local roles in a config. [sgeulette]

  • Added update_security_index method to update security index [sgeulette]

1.4 (2019-06-23)

  • Safe dict key access [sgeulette]

  • Added css id in configuration form. [sgeulette]

1.3 (2018-11-06)

  • Use safely state title in unicode. [sgeulette]

1.2 (2017-05-30)

  • Refactored utils method [sgeulette]

  • Added method to delete related uid annotation. [sgeulette]

1.1 (2016-04-18)

  • Useless subscriber removed. [sgeulette]

1.0 (2015-11-24)

  • Use only local roles in vocabulary. [sgeulette]

  • Store all configuration in one fti attribute ‘localroles’. Useful for dexterity.localrolesfield to avoid a field name is an existing attribute [sgeulette]

  • Add a related field to store a text configuration that will be used to set related objects local roles. [sgeulette]

  • Add related search utility [sgeulette]

  • Change related local roles on transition, on addition, on removal, on moving, on configuration changes [sgeulette]

  • Add an adapter for related local roles [sgeulette]

  • Simplify code [sgeulette]

0.2 (2015-06-02)

  • Avoid exception on site deletion [sgeulette]

0.1 (2014-10-24)

  • Various improvements [mpeeters, sgeulette]

  • Added tests [sgeulette]

  • Some improvements [sgeulette]

  • Add validation on configuration view [mpeeters]

  • Add localroles configuration view [mpeeters]

  • Add an adapter for borg.localrole [mpeeters]

Release files for dexterity.localroles 1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dexterity.localroles 1.6
File Size Uploaded
dexterity.localroles-1.6.tar.gz 36.5 kB Details

Release files / dexterity.localroles-1.6.tar.gz

Download URL dexterity.localroles-1.6.tar.gz
Size 36.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a8934059139dedc59de8b2781f1cbdfa30e288c475a7f27d165df5e0ff9fc2f1
BLAKE2b-256 checksum
How to use checksums
27420cd9c4b5096214eb31834f4b668b50cb375237b8c4b5b4f2a2ade8276d16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

1.6 This release

1 release file

1.5

1 release file

1.4

1 release file

1.3

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page