Esempio n. 1
0
	def list_all_users(self):
		table = [("Username","Status","2fa")]
		for (user, status, two_factor) in c.execute("SELECT username, inactive, two_factor FROM users ORDER BY inactive, username"):
			if status == 0:
				table.append((user,"Active",two_factor))
			else:
				table.append((user,"Inactive",two_factor))
		Helpers.print_table(table)
Esempio n. 2
0
	def list_all_maps(self):
		table = [("Username", "Network")]
		for (username, network) in c.execute("SELECT username, network FROM network_map ORDER BY username, network"):
			table.append((username, network))
		Helpers.print_table(table)
Esempio n. 3
0
	def list_all_networks(self):
		table = [("Network", "Description")]
		for (network, description) in c.execute("SELECT network, description FROM networks"):
			table.append((network, description))
		Helpers.print_table(table)