Package com.jk.webstack.security
Class UserRole
java.lang.Object
com.jk.webstack.security.UserRole
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.GrantedAuthority
@Entity
public class UserRole
extends Object
implements org.springframework.security.core.GrantedAuthority
This class represents user roles in the application and implements the
GrantedAuthority interface.
It provides information about the user's role and authority within the system.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method get the authority of the user role.getName()
This method get the name of the user role.
-
Field Details
-
ADMIN
Represents the admin role.- See Also:
-
-
Constructor Details
-
UserRole
public UserRole()
-
-
Method Details
-
getAuthority
This method get the authority of the user role.- Specified by:
getAuthority
in interfaceorg.springframework.security.core.GrantedAuthority
- Returns:
- the authority name, which is the same as the role name.
-
getName
This method get the name of the user role.- Returns:
- the name of the user role in lower-case.
-