The ROLE_* is necessary when we use authorities inside annotations etc.
It is a little bit confusing that we have different constants etc.
Wanted
RoleConstants shall only contain the role names without the "ROLE_*" prefix variants.
And where possible we should always use the role name instead the authorization part.
Situation
Inside Role constants we differ between "ROLE_$ROLENAME" and "$ROLENAME".
An example:
The
ROLE_*
is necessary when we use authorities inside annotations etc.It is a little bit confusing that we have different constants etc.
Wanted
RoleConstants
shall only contain the role names without the "ROLE_*" prefix variants. And where possible we should always use the role name instead the authorization part.