class AuthorizationUtils {
	
	@Inject
	private UserFacade userFacade;
	
	public String authenticatedUser() {
		String authenticatedUser = userFacade.authenticatedUser();
		if (authenticatedUser == null) {
			throw new UnauthorizedException();
		}
		return authenticatedUser;
	}
	
	public void authorizeUser(String authenticatedUser, List<String> roles, MerchantStore store) {<FILL_FUNCTION_BODY>}

}

		userFacade.authorizedGroup(authenticatedUser, roles);
		if (!userFacade.userInRoles(authenticatedUser, Arrays.asList(Constants.GROUP_SUPERADMIN))) {
			if (!userFacade.authorizedStore(authenticatedUser, store.getCode())) {
				throw new UnauthorizedException("Operation unauthorized for user [" + authenticatedUser
						+ "] and store [" + store.getCode() + "]");
			}
		}
	
<no_super_class>