We couldn't figure out why we were having problems with adding conditional fieldgroups, until we realized that there is a permission check that only user 1 can pass, since it's not defined anyplace else.


/**
 * Implementation of hook_perm()
 */
function conditional_fields_perm() {
  return array('administer conditional fields');
}

/**
 * Alteration of the fieldgroup editing form
 */
function conditional_fields_fieldgroup_edit_group_form(&$form) {
  if (!user_access('edit conditional fields')) {
    return;
  }

The only defined permission is 'administer', but that checks for an 'edit' permission, so only User 1's ability to pass any user_access check allows the fieldgroup to get a conditional setting. Either add 'edit' to the permissions, or change the check to 'administer'.

Comments

peterpoe’s picture

Status: Needs review » Fixed

There should be no 'edit conditional fields' permission. Fixed in dev, thanks!

Status: Fixed » Closed (fixed)

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