# Copyright (c) 2015, XhiveFramework Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE

import xhiveframework
import xhiveframework.www.list
from xhiveframework import _

no_cache = 1


def get_context(context):
	if xhiveframework.session.user == "Guest":
		xhiveframework.throw(_("You need to be logged in to access this page"), xhiveframework.PermissionError)

	context.current_user = xhiveframework.get_doc("User", xhiveframework.session.user)
	context.show_sidebar = True
