title: How to configure ROLE prefix Spring Security
body: <p>Good day collegues.
  Have tried to use diffirent variant but nothing happened.</p>
  
  <p>I have an a code where is next method:</p>
  
  <pre><code>public List&lt;String&gt; getUserRoles() {
  
          List&lt;String&gt; roles = new ArrayList&lt;&gt;();
          for (GrantedAuthority authority : SecurityContextHolder.getContext().getAuthentication().getAuthorities()) {
              roles.add(authority.getAuthority().toUpperCase());
          }
  
          return roles;
      }
  </code></pre>
  
  <p>I want to get all user authirities from Active Directory, but get only with <strong>prefix "ROLE_"</strong></p>
  
  <p>I tried:</p>
  
  <ol>
  <li><p>Use application.yaml + code(prefix in yaml==null):</p>
  
  <p>method(AbstractContextSource ldapContext,
                                  AuthenticationManagerBuilder builder)...</p>
  
  <pre><code>builder.ldapAuthentication()
         .ldapAuthoritiesPopulator(populator)
         .contextSource(ldapContext)
         .userSearchFilter(userSearchFilter)
         .userSearchBase(userSearchBase)
         .groupSearchBase(groupSearchBase)
         .groupSearchFilter(groupSearchFilter)
         .rolePrefix(rolePrefix);
  </code></pre>
  
  <p>It doesnt work.</p></li>
  </ol>
  
  <p>2.different custom classes doesnt work too.</p>
  
  <p>My question is how to get all roles without prefix ROLE_.</p>