【Drupal8】如何在twig判斷使用者

Drupal8裡面有提供user.getroles的參數可以供我們來取得當前使用者的角色

 {% set roles = user.getroles() %}