There are 5 permissions per field. This takes me forever to select all permissions for all fields using field permissions.

It would make sense that the field permissions are a dependency from the field it self. Kind of like field_info is. Clicking a field should check all related field permissions for that field.

BONUS:
Better yet, hide the permissions from features to help de-clutter the list.

Comments

kbasarab’s picture

This would be a great addition I agree. Issue I see though is that field_permissions module doesn't implement anything with features. The features compatibility comes with the way permissions are added from the field forms. There might be a hook to implement this though in some other way though.

adamtong’s picture

I would like it to be exportable with Features. It will be great!

Thank you!

Angry Dan’s picture

Status: Active » Needs review
StatusFileSize
new1.01 KB

This is simple enough. I've written a patch which should provide the functionality. Just export a field base to have all of the field permission permissions exported along with it when applicable.

michielnugter’s picture

Thanks for the patch. I tested the provided patch but it had a small issue. It looped through the wrong field_base array, exporting all the used field_base components instead of only the field_base components that will be exported in the feature. I created a new patch with these changes (sorry, svn patch). I hope anyone can review it and include it in the next module release.

Status: Needs review » Needs work

The last submitted patch, field_permissions.miscellaneous.1845798-4.patch, failed testing.

japicoder’s picture

I did a re-roll of the svn patch and used git to generate a new one that can be tested, but I can't upload it. There's a way to upload this patch?

Angry Dan’s picture

Yeah, just click "update this issue" and attach it at the bottom.

kerasai’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: field_permissions.miscellaneous.1845798-4.patch, failed testing.

chriscohen’s picture

I have tried this patch (#4) and it seems to work fine, functionally. Not sure why it's failed testing though. This is a very old issue. Can we get some progress on this please? It's frustrating that this module doesn't allow its config to be exported to features!

Angry Dan’s picture

Issue summary: View changes
StatusFileSize
new1.33 KB

The testing failed because the patch failed to apply. I'm having the same problem so here's a re-roll of #4

Angry Dan’s picture

Status: Needs work » Needs review
fullerja’s picture

Patch in #11 worked for me

arpitr’s picture

k_zoltan’s picture

Status: Needs review » Reviewed & tested by the community

Just tested patch #1 and all works well.

k_zoltan’s picture

Would be great if we could get this commited since it doesn't break the current structure just adds an extra function for the "feature" feature.

paulsheldrake’s picture

The patch in #11 worked for me

blainelang’s picture

+1 for patch #11, thanks!!

With nearly 24,000 reported installs maybe it's time to promote this module as well out of beta.

paul.linney’s picture

Patch in #11 works great. +1 for rtbc.

kerasai’s picture

This issue is already RTBC and should be included in the next release, whenever that might be. For the meantime, this patch is fine to apply to your sites.

Re-ran the automated test suite all good.

Manually test via Simplytest.me also works, field with "custom permissions" set up has those permissions included via dependency when added to a Feature module.

mile23’s picture

Just a +1 in general for better features integration. It's currently giving me a headache. :-)

Patch applies. Here's a mini-review:

+++ b/field_permissions.module
@@ -260,3 +260,27 @@ function _field_permissions_entity_is_owned_by_account($entity, $account) {
+  module_load_include('inc', 'field_permissions', 'field_permissions.admin');
+  // Validate if there are field_base components that will be exported for this
+  // feature.
+  if (isset($export['features']['field_base'])) {

Don't load the include until after you check if it's needed.

esolitos’s picture

Using patch from #11 successfully. Thanks!

@mainteiners Can we have this committed?

alison’s picture

Hi field_permissions maintainers! Do you know if you'll be committing this patch or not? I'm weighing pros/cons of applying to my sites. Thanks!

subhojit777’s picture

+1 RTBC

  • mariacha1 committed 86eef6c on 7.x-1.x authored by Angry Dan
    Issue #1845798 by Angry Dan, michielnugter, Mile23: Enable field...
mariacha1’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for this work everyone! Getting #11 committed with Mile23's suggestion.

@jhedstrom I'm guessing this isn't relevant for the D8 branch?

Status: Fixed » Closed (fixed)

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

hazong’s picture

Is this patch already applied?

kerasai’s picture

Yes. This included in 7.x-1.0 and up.

It's also in any version of the 7.x-1.x-dev release after 7.x-1.0-beta2 release.