# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+from ipsilon.util.log import Log
from ipsilon.util.page import Page
from ipsilon.util.user import UserSession
from ipsilon.util.plugin import PluginLoader, PluginObject
import cherrypy
-class LoginManagerBase(PluginObject):
+class LoginManagerBase(PluginObject, Log):
def __init__(self):
super(LoginManagerBase, self).__init__()
if not ref:
ref = cherrypy.config.get('base.mount', "") + '/'
- session.login(username)
-
- # Save additional data provided by the login manager
- if userdata:
- for key in userdata:
- session.save_data('user', key, userdata[key])
+ session.login(username, userdata)
raise cherrypy.HTTPRedirect(ref)
raise cherrypy.HTTPRedirect(ref)
- def _debug(self, fact):
- if cherrypy.config.get('debug', False):
- cherrypy.log(fact)
-
def get_tree(self, site):
raise NotImplementedError