Пример #1
0
def admin_manage_users():
    """ add, modify and remove admin users """
    admin_info = db.get_admin_user_list()    
    read_perms = db.get_all_read_perms()
    write_perms = db.get_all_write_perms()
    org_units = db.get_org_unit_info()

    if g.username in g.admins:
	return render_template('admin_manage.html', 
		pagetitle = g.appname + " - Manage Administrators",
		subtitle = "Manage Administrators", 
		name = g.user, admin_info = admin_info, 
		read_perms = read_perms,
		write_perms = write_perms,
		org_units = org_units,
		is_admin = True)
    return render_template('unauthorized.html', name=g.user,
	    subtitle = "Not Authorized", is_admin = False)
Пример #2
0
def admin_dashboard():
    """ main admin user page """

    modules = db.get_module_info()
    org_units = db.get_org_unit_info()
    last_updated = db.get_last_updated_module()

    if g.username in g.admins:
	return render_template('admin_dashboard.html', 
		pagetitle = g.appname + " - My Dashboard",
		subtitle = "Administrator Dashboard", 
		name = g.user,
		modules = modules,
		last_updated = last_updated,
		org_units = org_units, 
		is_admin = True)
    return render_template('unauthorized.html', name=g.user, 
	    subtitle = "Not Authorized", is_admin = False)