Skip to content

Instantly share code, notes, and snippets.

@jmertic
Created September 25, 2012 18:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmertic/3783642 to your computer and use it in GitHub Desktop.
Save jmertic/3783642 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