Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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