Страница падает с ошибкой 500 при добавлении аутентификации

Господа спецы, подскажите, плиз: проект Spring Boot / Security, при добавлении в html/Thymeleaf sec:authentication=”principal.authorities” браузер выдаёт 500 и

Error retrieving value for property "”principal.authorities”" of authentication object of class org.springframework.security.authentication.UsernamePasswordAuthenticationToken

Invalid property '”principal' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken]: Bean property '”principal' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?

при этом в консоль authentication.getAuthorities() значение выводит, в дебаге тоже всё на месте, и если закомментить проблемную строку, то у этой кнопки ограничение доступа работает:

    <div sec:authorize="hasAuthority('ADMIN')">
    <form th:action="@{/bankdemo/accounts/show/{phone}(phone=${account.phone})}"
     th:method="delete">
        <input type="hidden" th:name="id" th:value="${bill.id}"/> 
            <button class="btn btn-danger"
            onclick="if (!(confirm('Are you sure you want to delete this bill?')))
                return false">
            Erase</button>
    </form>
    </div>

Поле:

    @ElementCollection(targetClass = Role.class)
    @CollectionTable(name="roles", joinColumns = @JoinColumn(name="account_id"))
    @Enumerated(EnumType.STRING)
    private Set<Role> roles;

Геттер:

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return roles;
    }

Энам:

public enum Role implements GrantedAuthority{
    ADMIN, CLIENT;

    @Override
    public String getAuthority() {
        return name();
    }
}

Что не так?


Ответы (1 шт):

Автор решения: V-CHO

Баг копипасты! Кавычки с неправильным шрифтом ”principal.authorities” не распознавались!!!

→ Ссылка