Hi all,

I have a question about how to organize a Drupal setup. I am new to Drupal specifically, and CMS in general.

I have an LDAP server (AD) which defined users and their group memberships. I need a way to 'partition' our setup in such a way as to let users create and edit articles only in their assigned 'partitions'.

For instance, suppose there are two groups, Marketing and Finance, defined by users' LDAP group memberships. I need to set up Drupal in such a way that the following constraints would be observed:

  • Articles automatically have URLs which reflect their group-centric categorization, e.g. there should be articles /Marketing/Foo, /Marketing/Bar, /Finance/Baz, etc. The group-named URL prefixes would form the visible manifestation of the 'partitioning'. The partitioning would probably be done via something like categorization.
  • When users create a new article, it's automatically placed into one of the 'partitions' according to the user's group membership. If a given user has edit privileges in both Marketing and Finance groups, they should be able to pick which partition the article goes into
  • Users should only be able to edit (some) articles within their partition. I.e. a Marketing user may or may not be able to edit all the articles in the Marketing partition (that's still to be determined), but they should definitely not be able to edit articles in the Finance partition.

Can anyone help me understand what it would take to achieve this sort of setup? I understand that I would need to set up the LDAP connector and establish group mapping for it, but beyond that, what would it take to permit me to 'partition' the Drupal installation in such a way as I described above? Are there extensions which make this possible, or perhaps core functionality that I am not aware of which can accomplish this?

The flow I am imagining (and mind you, this is pure imagination) is something like this:

  • When a user creates an article, it's automatically categorized based on their group membership, e.g. 'Marketing'.
  • This categorization is mandatory and automatic, cannot be removed, and can only be edited if the user has membership in multiple groups.
  • Being in a group-based category automatically creates a user-friendly alias for the article based on its category and title, e.g. when a member of the Marketing group creates an article titles 'How to sell snow in the winter', it becomes accessible via URL '/Marketing/How-to-sell-snow-in-the-winter'.

Is something like this -- or any other solution for the problem outlined earlier -- possible, using standard Drupal facilities and extensions?

I already have LDAP, OG, Pathauto, and GlobalRedirect extensions.

Any and all advice and feedback is welcome.

Comments

Sam Moore’s picture

Organic Groups is the tool I'd use most for this. I see you already have it - have you investigated?

Each department should be its own group.
OG can ensure that only users who are members of a group can see and edit that group's content.
You should be able to use Pathauto to add the group name as a token in each new URL path as nodes are created.

danilchenko’s picture

Hi Sam,

I am trying to figure out OGs right now. The thing is, I am really not getting the data model behind it -- it seems very weird. I created a group content type and a group that uses it, except that I can't even edit group membership -- I get 'access denied' message, despite being superuser and group owner (I posted that question at https://www.drupal.org/node/2612036).

I also configured LDAP/OG integration to map my LDAP group membership to the OG group, but apparently that doesn't work either: when I log in with my LDAP account, I don't get added to the test group.

Content types, group types, , groups, attributes, membership types -- I am really not getting how it's all tied together. It looks to me like there SHOULD be a way to accomplish what I want via OGs and LDAP, but I am having difficulty getting OGs to what what I want. The intro docs I found are for Drupal 6, and enough has changed in Drupal 7 that the instructions seem half-incomprehensible.

Sam Moore’s picture

Have a look at the Drupal Commons distribution, which is based on OG - it has a lot of stuff already set up, and the docs are better.
You can download it and try it out quite easily.

I wouldn't use Commons for production - I dislike using distributions for production altogether, after several annoying experiences - but it's a good way to learn what's possible and get a sense of how to set it up.

https://www.acquia.com/solutions/digital-experience-management/community

vdanilchenko’s picture

Thanks, I will give the distro a shot.

onejam’s picture

I have a feeling you aren't really trying to create a website but more of a web application where Marketing or Finance groups can access and share docs and files.

I might be wrong but i think you might want to take a look at https://owncloud.org/ Have a look at OwnCloud, in case you might end up trying to create an alternative version using Drupal.

Even if Drupal is involved, it is really just used as a front facing website to access the documents, in this scenario. So here is the thing, you can integrate both https://www.drupal.org/project/owncloud

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

onejam’s picture

Oh, another alternative is the Drupal Distro: https://www.drupal.org/project/openlucius

There's even a LDAP available: https://www.drupal.org/project/openlucius_ldap

You don't need to use all the features available but this would certainly save you countless days and weeks of development.

-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien

danilchenko’s picture

Thanks for your suggestion, Duvien. We actually are exploring setting up a CMS, for publishing various types of documentation -- we just need a corporate-style access control around it, with per-department partitioning and AD integration.