I have a fresh drush-made dev instance of commons. Creating documents via the commons browsing widget has some glitches. I have enabled Commons Documents and set document permissions very generously in OG and people.

  • Jane Doe is registered site user and member of group H (as authenticated user and group member she has all document permissions in group H.)
  • HOwner is group administrator and owner of group H (and so also has all document permissions in group H)

Here are some things I observe:

  • Jane Doe does not see "Create document" mini-form in the browsing widget viewed from the group H homepage, even when she clicks on the Documents quicktab icon. And so Jane Doe cannot create document.
  • Jane Doe does see "Create document" mini-form in the browsing widget viewed from the site default homepage (after clicking on Documents quicktab icon). However, group "H" refuses to show up in the "groups" field of the form, so Jane Doe's attempt to create document fails with "There are no entities matching 'H'"
  • HOwner does see "Create document" mini-form when viewing browsing widget--both in site homepage and group H home page. Group "H" shows up in the "groups" field as desired. However, creating document fails due to "EntityMetadataWrapperException: Unknown data property group_content_access. in EntityStructureWrapper->getPropertyInfo() (line 339 of mysite/profiles/commons/modules/contrib/entity/includes/entity.wrapper.inc)"

Comments

devin carlson’s picture

Assigned: Unassigned » devin carlson
Status: Active » Needs review
StatusFileSize
new5.08 KB

I'm not 100% sure on the desired default permissions for documents (@ezra-g?) but Commons Documents currently lacks any default permissions for core or OG. This prevents the user from seeing the mini form (although the document tab shouldn't appear at all, which sounds like a separate bug).

The attached patch adds standard default permissions and an update function to revert core and OG permissions.

behoppe333’s picture

Thanks devincarlson. I created fresh install from scratch and applied patch from #1.

My basic problem is that I can't configure my site so that group members who are regular authenticated site users can create documents. Even with the patch I am still stuck. Here are my steps:

When I enabled Commons Documents I observed that people > permissions has following settings for Documents:

  • Document: Create new content -- allowed to auth users
  • Document: Edit own content -- allowed to auth users
  • Document: Edit any content -- allowed to auth users
  • Document: Delete own content -- not allowed to auth users
  • Document: Delete any content -- not allowed to auth users

I think before patch #1 was available, all of the above were not allowed to auth users by default. So instead of editing the above permissions manually as I did previously, this time I just left them as above.

I was able to post a document using user-1 admin account. I created Jane Doe regular user account and made her a member of the group "Engineering team". No matter how I edited permissions (e.g., enabling all document permissions in people/permissions for authorized users, OG permissions for node-group allowed to members, and OG permissions for user-user allowed to members) Jane Doe cannot post a document to group Engineering team. This is same behavior I observed before the patch.

I have a much easier time allowing site admins and group admins to post documents. The problem is allowing regular group members to post documents.

devin carlson’s picture

@behoppe333 The patch in #1 changes the default OG permissions which will only apply to new groups. If you have existing groups you'll need to add the "* document content" permissions to them manually visiting the group and going to administer group -> permissions.

I'm not sure if the update function should be expanded to automatically add these permissions to all existing groups.

behoppe333’s picture

doh! Thanks devincarlson. I feel silly for overlooking the permissions for that specific group. Regular members of groups in my site can now create documents :-)

japerry’s picture

Assigned: devin carlson » japerry
Priority: Normal » Major
Issue tags: +Commons 7.x-3.3 radar

Tagging 3.3 -- this should be fixed with other work I'm doing to the documents feature, to bring it upto date with other content type features in commons.

japerry’s picture

Status: Needs review » Fixed

Fixed!

http://drupalcode.org/project/commons_documents.git/commit/3a36f2b

Also includes feature syntax updates.

Automatically closed -- issue fixed for 2 weeks with no activity.