Imagine the body field used for 10 entities (nodes, taxonomies, users etc).
If i want to use Field permission then i'll have to build 10 different body fields so i can use Field permissions.
So the entity based Field permissions could be the right approach?
Comments
Comment #1
szantog commentedThat's right, imho now this is completly against d7 field terminology. This settings should be as instance settings, not field settings. Now I need to use this in some field, I will do it implement own _field_access. But if I will need more, I will try to fix it, but I think, this is not too simple..
Comment #2
David_Rothstein commentedWhat makes this a bug?
For the primary use case of this module, it actually doesn't seem like a good change to me; if you have a field that you want to control access to because it is collecting private/sensitive content, then you'd usually want to manage that access centrally in one place, not in 10 different places.
Comment #3
vasikeyes you're right, in one place, because the other 9 it's nothing to set, the field instance remains without any permission settings
probably the challenge here it's to create the upgrade.
Comment #4
David_Rothstein commentedI've been looking through the issue queue a bit, and I think this issue may be a duplicate of (or at least closely related to) #1050396: Per node type field permissions, which was marked "won't fix"....
Comment #5
robloachYeah, this could really make the permissions table unnecessarily huge. I'm inclined to set this to won't fix. It would be best to just create a new field for it.
Comment #6
David_Rothstein commentedI just marked #1826348: Changing field permissions in content type with same name of another field in a 2nd content type changes both permissions as duplicate. Since this keeps coming up, perhaps there are use cases for it - basically if you are using Field Permissions to hide things for certain user roles for aesthetic reasons rather than for actually storing truly private data...?
But I'm still thinking it's not a good match for the module's primary use case, and if you need this then in most cases you probably want to create a new field anyway (like Rob Loach said above).
Keep in mind also that this module is in many ways a light user interface wrapper around the field API, and field_access() itself is very much about the field rather than the instance.
Comment #7
mlzrpity! I also have more bundles, and the field names in the bundle must be the same :-(
Looking for another solution ...
Comment #8
miroslavbanov commentedWould the maintainers be interested in a patch that adds the per-instance permission as additional option - to be checked before the per-field access? If so, I might work on a patch. I can understand if this is seen as unnecessary bloat, and then a separate module would be the solution.
Comment #9
miroslavbanov commentedI have implemented a sandbox module that has field permissions per instance. Much of it is directly copied from the Field permissions module.
Is it OK to have two separate bet very similar modules? Or should this be merged into Field permissions? This should be up to the maintainers of Field permissions to decide.
Comment #10
enboig commentedI have the same problem. Re-used a field in profile and in a node. I want to allow any user to edit its own profile; but in nodes only admins should update it.
+1 to be able to an option to set "per field" or "per instance" permission.
Comment #11
drikc commentedIn reponse to comment #5 I've added a patch for field_instance_permissions sandbox module that move field instance permissions administration into a separate form page #2415033-1: Administer field instance permissions in a seperate form (instead of the regular permissions matrix).
Comment #12
nithinkolekar commentedCouldn't we implement same functionality provided in views like "all displays"(all fields),"except overidden" kind of thing. It is more familiar to dupallers IMO.
Comment #13
ludo.rI have a project where the body of one content-type is displayed only for subscribers.
If I use the custom permissions for the body field, it is applied to all my content-type's body fields...
There is definitely something wrong on Drupal's field settings page, as we don't know if we are updating the field base or instance... :(
I was so confident that field_permissions was based on field instance, now I have to look for another solution, or maybe patch.
Comment #14
ludo.rJust for my personal information, is there any reason such performance issues to not include field instance settings?
I'm implementing my own
hook_field_access()for my current project.Thanks!
Comment #15
mariacha1 commentedAs stated above, per-bundle config would take up a lot of extra space in the database, and would cause you to have to update each bundle for field settings instead of just one. The module that attempted to fix this never got off the ground, so I'm marking back to "won't fix".
Comment #16
fgjohnson@lojoh.ca commentednithinkolekar +1 for your idea @ #12.
Still looking for a solution to this.
Comment #17
djpable commentedNot implementing istance base permission makes this module unusable.
Create other fields equals to others only to define different permissions makes really take up "extra space (meta)data".
This really not OOP making fields not reusable!