Field Denied Access provide ability to deny fields access so no one can't change their values by using user interface.

For instance, if we add new field for storing user balance data (field_user_balance) and want to protect this field from changing it's value by using UI, we should deny access to this field. In this case, submit form will never appear.

GIT: git clone http://git.drupal.org/sandbox/tulvit/1262156.git field_denied_access
Project URL: http://drupal.org/sandbox/tulvit/1262156

Comments

sreynen’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed this module and found no problems.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work

variable_get() should take two parameters, since NULL isn't really valid in this case.

array(NULL) is redundant

List files[] in the .info only when they contain OO classes or interfaces, and never the .module file

Implements hook_help(). No "of", always parentheses.

Use single quotes unless needed, and be consistent. In one place you have single quotes with apostrophes escaped, other places you use double quotes.

"Provide to deny field access" is not a sentence.

Lines of documentation should end with a full stop, you're missing them on the lines below @param

misc’s picture

The applicant has been contacted to ask if the application is abandoned.

misc’s picture

@tulvit says that the application is not abandoned.

tulvit’s picture

Status: Needs work » Needs review

Sorry it took so long.

@tim.plunkett

Lines of documentation should end with a full stop

Fixed.

Use single quotes unless needed

Fixed.

Implements hook_help(). No "of", always parentheses.

Fixed.

"Provide to deny field access" is not a sentence.

Changed to "Provide ability to deny fields' access.".

variable_get() should take two parameters, since NULL isn't really valid in this case.
array(NULL) is redundant

Changed to

  $form['field_denied_access'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Define which fields must be access denied.'),
    '#options' => $options,
    '#default_value' => variable_get('field_denied_access', array()),
    '#description' => t('Denied fields\' access so no one can\'t change their values by using user interface.'),
  );

It seems like the only right option in this case.

rudiedirkx’s picture

Why is this module better than Field Permissions? What does it add that FP doesn't?

tulvit’s picture

Status: Needs review » Closed (duplicate)

@rudiedirkx

Thanks for the reply.

Now Field Permissions works just fine, but last summer it didn't, that's why I decided to write my own module (I can't remember what exactly those problems with FP were).

For now, the only two differences are:
- My module denies fields' access for all users, including user/1.
- This issue is still open.

But I think it's not enough to publish module with the same functionality. So, changed status to "close (duplicate)".

avpaderno’s picture

Issue summary: View changes
Status: Closed (duplicate) » Closed (won't fix)