if (base.RequestContext.GetIn this example, the code checks if the current authenticated user has the "Admin" role. If the user has the role, then the code executes some admin-only action. Package Library: ServiceStack.Authentication Overall, the IAuthSession HasRole method is a useful tool for enforcing role-based access control in ServiceStack applications.().HasRole("Admin")) { // Perform admin-only action }