Problem/Motivation

Module permissions system is a bit messy. Most of the permissions are very common and can be divided to several more specific. Also you need to grant to user restricted permissions to view Reference type field or contributor Category/Role.

Proposed resolution

Rework naming of permissions, add new permissions for more specific module functionality.

API changes

Some of module permissions will be renamed.

Comments

kruhak created an issue. See original summary.

camilocodes’s picture

Hi. I was just wondering how progress on this is going? We are currently depending on this fix to be able to display certain fields (author, type) to unauthenticated users. If this is a complicated issue we might have to work on sidestepping permissions, which we can do but would be a less elegant solution.

antongp’s picture

Hello @camilocodes. We hope to handle this somewhere next week.

camilocodes’s picture

Great news! Thanks.

Anonymous’s picture

Thanks!

camilocodes’s picture

Hi @antongp. Just checking to see if there has been any progress on this matter? Thanks.

antongp’s picture

Hi @camilocodes. Unfortunately not much. Good news is that we finally returned to active development. So stay tuned.

Thanks!

camilocodes’s picture

Thanks for the reply. Tuned!

Anonymous’s picture

Thanks for the reply let us know if you need testing help.

camilocodes’s picture

Hello! It has been a while, so I figured I'd come back and ask if there's been any progress on this @antongp?

Thanks!

antongp’s picture

Status: Active » Needs work

Okay... We renamed permissions (both machine and human-readable names), to make the names more consistent. Manual changes may be needed though, please read changelog record for more info on this: http://cgit.drupalcode.org/bibcite/tree/CHANGELOG.md?id=63332e7c#n6
We also added create/update/delete permissions per each Reference entity type/bundle, which are also divided to "any" and "own", like any type permissions.

@camilocodes
Showing contributor/author role and category on references is basically not related to permissions and was committed within this issue: #2936662: Add options to show role and/or category in contributor field formatter.. Formatting capabilities are small for now though, just comma-separated.
Showing reference type is basically not related to permissions as well and was committed within this issue: #2940219: Add extra field with reference type to reference entities.. Also bundle could be outputted via Display Suite for example, but this is additional dependency and not small...

I doubt that permissions for contributor and keyword entity types will be divided into "own" and "any". There is also request for "Published" flag on entities #2934158: Add "Promoted" to the Reference entity which is related at some degree. I'm not sure what else can be added or changed within this issue, so feel free to leave your feedback and other needs re. permissions in comments! Leaving the issue in "Needs work" for now...

  • adci_contributor committed 7a31af4 on 8.x-1.x
    Issue #2878975 by kruhak: Improve module permissions. Update views...

  • adci_contributor committed 32870fb on 8.x-1.x
    Issue #2878975 by kruhak: Improve module permissions. Update views...
camilocodes’s picture

Thanks so much! This gives us a few avenues to implement features we're interested in.

camilocodes’s picture

@anton_gp

Thanks for all your work. Could you please elaborate on how displaying Reference Type is not related to permissions when, if you use that field in a view, the value is visible for anyone w/ the permission "Administer Reference entities" exclusively? Displaying the value is not akin to administering the entity, so it seems to me this permission/field definition might need work.

I don't quite understand the resolution to "#2940219: Add extra field with Reference Type to reference entities." It is not clear to me which field was added as a response to this ticket. Was it ? Mapping that field to BibTex "type" (replacing my initial Reference Type, which, again, works for users w/ permissions) causes my imports to fail. I would like to report this, but I don't know if I am using the correct field, or if the right place for reporting that would be here, #2940219, or a brand new ticket.

In conclusion, I appreciate all the work put into this, but at the end of the day I am still unable to create a view for my references which displays the reference type to users without important, security-sensitive permissions. Maybe I am doing something wrong?

Thanks (:

antongp’s picture

Ahh, you're building view which shows fields. Yes, you're right :)

#2940219 adds "extra field" which can be managed on "Manage display" tab for each Reference entity type (Artwork, Journal, etc.). So if you render whole entities in some view mode when building view, this will work. But if output fields separately, yeah, there was a problem with permission. Actually "Reference type" extra field which was added within #2940219 technically is not related to what appears in list of fields in view (though both are named the same). Latest dev has fix for this, now "View Reference entities" permission is enough to see Reference type field outputted in view.

There basically nothing to do with mapping, you shouldn't map anything to Reference type field. Basically you map types by Format Type <-->Reference Type mapping.

Hope this helps. Thanks!

antongp’s picture

Status: Needs work » Fixed

Doesn't seem that there are any additional changes to do within this ticket. Closing for now.

Status: Fixed » Closed (fixed)

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