/** * Validate the CSR user to ensure it is active and has a role assigned. * * @param Mage_Admin_Model_User $user * @throws EbayEnterprise_Eb2cCustomerService_Exception_Authentication * @return self */ protected function _validateUser(Mage_Admin_Model_User $user) { if (!$user->getIsActive()) { throw new EbayEnterprise_Eb2cCustomerService_Exception_Authentication('This account is inactive.'); } if (!$user->hasAssigned2Role($user->getId())) { throw new EbayEnterprise_Eb2cCustomerService_Exception_Authentication('Access denied.'); } return $this; }