Set permission for a specific column in view for table format in drupal 8 I have created a view in table format and added a field as global custom text field. I want to show this field to administrator only, not to other created roles. How can I do that?
you need to do something like this in global php field :

$uid = 1; 
$user = \Drupal\user\Entity\User::load($uid); 
$roles = $user-&gt;getRoles();
$v=$roles[1];
if($v == "administrator") 
{
echo "your-content"; 
 } 


Global php field will be available as Replacement pattern add that variable in your custom text field.