presto-hive/src/main/java/io/prestosql/plugin/hive/security/SqlStandardAccessControl.java/SqlStandardAccessControl/checkCanSetRole
class SqlStandardAccessControl:    @Override
    public void checkCanSetRole(ConnectorSecurityContext context, String role, String catalogName)
    {
        SemiTransactionalHiveMetastore metastore = metastoreProvider.apply(((HiveTransactionHandle) context.getTransactionHandle()));
        if (!isRoleApplicable(metastore, new HivePrincipal(USER, context.getIdentity().getUser()), role)) {
            denySetRole(role);
        }
    }