Skip to content

Instantly share code, notes, and snippets.

@karlingen
Forked from jmertic/gist:3783642
Created April 2, 2014 14:40
Show Gist options
  • Save karlingen/9935531 to your computer and use it in GitHub Desktop.
Save karlingen/9935531 to your computer and use it in GitHub Desktop.
<?php
$permissions = ACLField::hasAccess($field, $module, $GLOBALS['current_user']->id, $is_owner);
switch ( $permissions ) {
case 0:
echo "No access to this field";
break;
case 1:
echo "Read-only access to this field";
break;
case 2:
echo "Write-only access to this field";
break;
case 4:
echo "Full read/write access to this field";
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment