hi

is it possible to disable field permission for a field with a kind of additional radio chekbox with label : "disable field permission for this field" together with the existing radio button in field settings

thanks

Comments

delacosta456 created an issue. See original summary.

mariacha1’s picture

How would this be different from setting the field permission to "Public (author and administrators can edit, everyone can view)"?

delacosta456’s picture

hi
using that kind of settings will it not impact the normal permission setting?

mariacha1’s picture

Nope. "Public" is functionally equivalent to saying "Don't restrict." In fact, the field permission field_access hook checks whether a field is public and immediately exists if it is:

function field_permissions_field_access($op, $field, $entity_type, $entity, $account) {
  // Ignore the request if permissions have not been enabled for this field.
  if (!isset($field['field_permissions']['type']) || $field['field_permissions']['type'] == FIELD_PERMISSIONS_PUBLIC) {
    return;
  }

...

Are you seeing behavior where a field isn't showing up even though you've got it listed as "Public"?

delacosta456’s picture

"Are you seeing behavior where a field isn't showing up even though you've got it listed as "Public"?"

yes.But i will try a test of fiels_permission on a clean install and see how everything behave because on the project i am working actually there a lot of access module which may give confusion sometimes

thanks for your assistance.

jhedstrom’s picture

There's an open issue to rename 'public' to something more meaningful: #2776953: Field visibility and permissions value "Public" is misleading.

delacosta456’s picture

hi
ok thanks i will visit and comment

mariacha1’s picture

Status: Active » Closed (works as designed)