Beispiel #1
0
    def GET(self, domain):
        if logman.LoggedIn() == True:
            if qv_domains.is_domain(domain):
                n_group = qv_domains.get_n_groups(domain)

                recs = usrman.get_usr_list()
                usrs = []
                for r in recs:
                    usrs.append(r["Username"])
                if qv_domains.Access_domain(
                        domain,
                        web.cookies().get('QV_Usr')) == "Coord":
                    return renderer.manage(
                        config.base_url,
                        domain,  # name of domain to manage (string)
                        True,  # is user logged in? (boolean)
                        logman.isAdmin(),  # is user and Admin? (boolean)
                        "Coord",  # Access that user has to domain (string)
                        qv_domains.get_list_of_editors(
                            domain
                        ),  # list of editors for domain (string[] / None)
                        None,  # list of coordinators for domain (string[] / None)
                        usrs,
                        n_group,
                        config.base_url + domain + '/view?magic=' +
                        qv_domains.get_admin_url(domain))
                if logman.isAdmin():
                    return renderer.manage(
                        config.base_url,
                        domain,  # name of domain to manage (string)
                        True,  # is user logged in? (boolean)
                        logman.isAdmin(),  # is user and Admin? (boolean)
                        None,  # Access that user has to domain (string)
                        qv_domains.get_list_of_users(
                            domain
                        ),  # list of users for domain (string[[]] / None)
                        None,  # list of coordinators for domain (string[] / None)
                        usrs,
                        n_group,
                        config.base_url + domain + '/view?magic=' +
                        qv_domains.get_admin_url(domain))
                if qv_domains.Access_domain(
                        domain,
                        web.cookies().get('QV_Usr')) == "Editor":
                    return renderer.manage(
                        config.base_url,
                        domain,  # name of domain to manage (string)
                        True,  # is user logged in? (boolean)
                        logman.isAdmin(),  # is user and Admin? (boolean)
                        "Editor",  # Access that user has to domain (string)
                        [""],  # list of editors for domain (string[] / None)
                        None,  # list of coordinators for domain (string[] / None)
                        usrs,
                        n_group)
            else:
                return web.notfound()
        return web.seeother('/login')
Beispiel #2
0
	def GET(self,domain):
		if logman.LoggedIn() == True:
			if qv_domains.is_domain(domain):
				recs = usrman.get_usr_list()
				usrs = []
				for r in recs:
					usrs.append(r["Username"])
				if qv_domains.Access_domain(domain,web.cookies().get('QV_Usr')) == "Coord":
					return renderer.manage(config.base_url,
						domain, 														# name of domain to manage (string)
						True,															# is user logged in? (boolean)
						logman.isAdmin(),												# is user and Admin? (boolean)
						"Coord",														# Access that user has to domain (string)
						qv_domains.get_list_of_editors(domain),							# list of editors for domain (string[] / None)
						None,															# list of coordinators for domain (string[] / None)
						usrs
					)
				if logman.isAdmin():
					return renderer.manage(config.base_url,
						domain, 														# name of domain to manage (string)
						True,															# is user logged in? (boolean)
						logman.isAdmin(),												# is user and Admin? (boolean)
						None,															# Access that user has to domain (string)
						qv_domains.get_list_of_users(domain),							# list of users for domain (string[[]] / None)
						None,															# list of coordinators for domain (string[] / None)
						usrs
					)
				if qv_domains.Access_domain(domain,web.cookies().get('QV_Usr')) == "Editor":
					return renderer.manage(config.base_url,
						domain, 														# name of domain to manage (string)
						True,															# is user logged in? (boolean)
						logman.isAdmin(),												# is user and Admin? (boolean)
						"Editor",														# Access that user has to domain (string)
						[""],															# list of editors for domain (string[] / None)
						None,															# list of coordinators for domain (string[] / None)
						usrs
					)
			else:
				return web.notfound()
		return web.seeother('/login')
Beispiel #3
0
	def GET(self):
		if logman.isAdmin():
			return renderer.users(config.base_url,True,usrman.get_usr_list())
		return web.notacceptable()
Beispiel #4
0
 def GET(self):
     if logman.isAdmin():
         return renderer.users(config.base_url, True, usrman.get_usr_list())
     return web.notacceptable()