Class Mage_Admin_Model_Session

Description

Auth session model

Located in /Admin/Model/Session.php (line 35)

Varien_Object
   |
   --Mage_Core_Model_Session_Abstract_Varien
      |
      --Mage_Core_Model_Session_Abstract
         |
         --Mage_Admin_Model_Session
Variable Summary
Method Summary
Mage_Admin_Model_Session __construct ()
Mage_Admin_Model_Session init (string $namespace, [string $sessionName = null])
boolean isAllowed (string $resource, [string $privilege = null])
boolean isLoggedIn ()
Mage_Admin_Model_User|null login (string $username, string $password, [Mage_Core_Controller_Request_Http $request = null])
string|null _getRequestUri ([Mage_Core_Controller_Request_Http $request = null])
Variables
boolean $_isFirstPageAfterLogin (line 43)

Whether it is the first page after successfull login

  • access: protected

Inherited Variables

Inherited from Mage_Core_Model_Session_Abstract

Mage_Core_Model_Session_Abstract::$_encryptedSessionId
Mage_Core_Model_Session_Abstract::$_skipSessionIdFlag
Mage_Core_Model_Session_Abstract::$_urlHostCache
Methods
Constructor __construct (line 49)

Class constructor

  • access: public
Mage_Admin_Model_Session __construct ()
init (line 67)

Pull out information from session whether there is currently the first page after log in

The idea is to set this value on login(), then redirect happens, after that on next request the value is grabbed once the session is initialized Since the session is used as a singleton, the value will be in $_isFirstPageAfterLogin until the end of request, unless it is reset intentionally from somewhere

  • see: self::login()
  • access: public
Mage_Admin_Model_Session init (string $namespace, [string $sessionName = null])
  • string $namespace
  • string $sessionName

Redefinition of:
Mage_Core_Model_Session_Abstract::init()
Init session
isAllowed (line 155)

Check current user permission on resource and privilege

Mage::getSingleton('admin/session')->isAllowed('admin/catalog') Mage::getSingleton('admin/session')->isAllowed('catalog')

  • access: public
boolean isAllowed (string $resource, [string $privilege = null])
  • string $resource
  • string $privilege
isFirstPageAfterLogin (line 193)

Check if it is the first page after successfull login

  • access: public
boolean isFirstPageAfterLogin ()
isLoggedIn (line 183)

Check if user is logged in

  • access: public
boolean isLoggedIn ()
login (line 82)

Try to login user in admin

  • access: public
Mage_Admin_Model_User|null login (string $username, string $password, [Mage_Core_Controller_Request_Http $request = null])
refreshAcl (line 127)

Refresh ACL resources stored in session

  • access: public
Mage_Admin_Model_Session refreshAcl ([Mage_Admin_Model_User $user = null])
setIsFirstPageAfterLogin (line 207)

Setter whether the current/next page should be treated as first page after login

  • access: public
Mage_Admin_Model_Session setIsFirstPageAfterLogin (bool $value)
  • bool $value
_getRequestUri (line 219)

Custom REQUEST_URI logic

  • access: protected
string|null _getRequestUri ([Mage_Core_Controller_Request_Http $request = null])

Inherited Methods

Inherited From Mage_Core_Model_Session_Abstract

Mage_Core_Model_Session_Abstract::addError()
Mage_Core_Model_Session_Abstract::addException()
Mage_Core_Model_Session_Abstract::addHost()
Mage_Core_Model_Session_Abstract::addMessage()
Mage_Core_Model_Session_Abstract::addMessages()
Mage_Core_Model_Session_Abstract::addNotice()
Mage_Core_Model_Session_Abstract::addSuccess()
Mage_Core_Model_Session_Abstract::addWarning()
Mage_Core_Model_Session_Abstract::getCookieDomain()
Mage_Core_Model_Session_Abstract::getCookieLifetime()
Mage_Core_Model_Session_Abstract::getCookiePath()
Mage_Core_Model_Session_Abstract::getEncryptedSessionId()
Mage_Core_Model_Session_Abstract::getMessages()
Mage_Core_Model_Session_Abstract::getSessionHosts()
Mage_Core_Model_Session_Abstract::getSessionIdForHost()
Mage_Core_Model_Session_Abstract::getSessionIdQueryParam()
Mage_Core_Model_Session_Abstract::getSessionSaveMethod()
Mage_Core_Model_Session_Abstract::getSessionSavePath()
Mage_Core_Model_Session_Abstract::getSkipSessionIdFlag()
Mage_Core_Model_Session_Abstract::getValidateHttpUserAgentSkip()
Mage_Core_Model_Session_Abstract::init()
Mage_Core_Model_Session_Abstract::isValidForHost()
Mage_Core_Model_Session_Abstract::setSessionId()
Mage_Core_Model_Session_Abstract::setSkipSessionIdFlag()
Mage_Core_Model_Session_Abstract::useSid()
Mage_Core_Model_Session_Abstract::useValidateHttpUserAgent()
Mage_Core_Model_Session_Abstract::useValidateHttpVia()
Mage_Core_Model_Session_Abstract::useValidateHttpXForwardedFor()
Mage_Core_Model_Session_Abstract::useValidateRemoteAddr()

Inherited From Mage_Core_Model_Session_Abstract_Varien

Mage_Core_Model_Session_Abstract_Varien::clear()
Mage_Core_Model_Session_Abstract_Varien::getCookie()
Mage_Core_Model_Session_Abstract_Varien::getData()
Mage_Core_Model_Session_Abstract_Varien::getSessionId()
Mage_Core_Model_Session_Abstract_Varien::getSessionName()
Mage_Core_Model_Session_Abstract_Varien::getSessionSaveMethod()
Mage_Core_Model_Session_Abstract_Varien::getSessionSavePath()
Mage_Core_Model_Session_Abstract_Varien::getValidateHttpUserAgentSkip()
Mage_Core_Model_Session_Abstract_Varien::getValidatorData()
Mage_Core_Model_Session_Abstract_Varien::init()
Mage_Core_Model_Session_Abstract_Varien::revalidateCookie()
Mage_Core_Model_Session_Abstract_Varien::setSessionId()
Mage_Core_Model_Session_Abstract_Varien::setSessionName()
Mage_Core_Model_Session_Abstract_Varien::start()
Mage_Core_Model_Session_Abstract_Varien::unsetAll()
Mage_Core_Model_Session_Abstract_Varien::useValidateHttpUserAgent()
Mage_Core_Model_Session_Abstract_Varien::useValidateHttpVia()
Mage_Core_Model_Session_Abstract_Varien::useValidateHttpXForwardedFor()
Mage_Core_Model_Session_Abstract_Varien::useValidateRemoteAddr()
Mage_Core_Model_Session_Abstract_Varien::validate()
Mage_Core_Model_Session_Abstract_Varien::_validate()
Class Constants

Documentation generated on Fri, 11 Feb 2011 17:12:15 +0200 by phpDocumentor 1.4.3