This project is not covered by Drupal’s security advisory policy.

The goal of this project is to provide a method for users to easily configure access settings to their own entities. The interface for configuring access will come from a shared access field attached to the entity.

Development Roadmap

  1. Implement field hooks to define the new shared_access field type.
  2. Define formatters and formatter settings.
  3. Define widgets.
  4. Implement an extendible access controller class structure for defining access realms and their underlying functionality.
  5. Define several default access realms (user, organic groups ... perhaps a few more).
  6. Implement field hooks so that a form shows up on the entity content page.
  7. Implement a standard sharing settings form that can hook into the access controller classes and be used to control access to the entity.
  8. Provide autocomplete functions and hooks for displaying user name/og suggestions as the user types
  9. Implement access hooks and query/query_HOOK alter functions to control access
  10. Implement field access hooks so that the form only shows when the owner or configured admins view the page.
  11. Provide a modal dialog field formatter for displaying the sharing settings form.
  12. Extend Views integration.
  13. Provide Rules integration.
  14. Extend to work with generic entities/provide hooks so that other modules implementing entities can use this module for sharing access.

!!! Testing it out !!!

The dev version is now available for download. Changes are still happening pretty rapidy. Mainly UI stuff, but if people are interested in seeing what the module will be able to do, they can download, install and test it out. Here are a few details on what can be done so far:

  • Add a shared access field to a content type. (The module will currently work for node access ... entity access soon to come)
  • When configuring the field select the user realm and/or group realm (OG).
  • Access for users may be configured through the field formatter 'embedded form' (which will be similar to the share form on google docs), OG groups can now use this as well. Both may be added manually on the content edit form as well if you select the 'Sharing settings form' widget.
  • Example of a manual user entry: realm = user, op = manage, gid = 3, gstr = example@example.com
  • Example of a manual group entry (OG 2.x): realm = group, op = view, gid = 2, gstr = node
  • : Where the gid is the id of a group entity and gstr is the entity type of the group. In the example node 2 is a group.

Cool stuff

Views

One of the cool things about this concept that I didn't even think about until a few weeks in, is that the integration with views that comes out of the box, without even having to extend views at all, will allow for the control of access to entity content using simple filters on a shared_access fields. With a little bit extra, access control through views could become very dynamic and powerful!

Field API

  • The major reason for going this route in making access to entities controlled through a field is several fold:
  • field db tables automatically come with entity_type, entity_id, delta and language columns which give advantages in terms of consistency for multiple access grants provided by multi field values per entity, per language. Boom! done, out of the box ... my brain explodes with possibilities.
  • provides much of the functionality already needed including hooks into the theme layer.
  • The possibility for multiple access fields to be attached to any given entity and each controlling similar or varying types of access.

... Its going to be sick, trust.

Check out the code

If you are interested in seeing what the code looks like download the dev version or clone the git repo.

Feedback in the form of constructive criticism will be much appreciated. :)

Did you get help in the issue queue? Do you like the module? Flattr me! :)
Flattr me.

Project information

Releases