Main Page
Namespaces
Classes
Files
File List
src
webui
mod
webui
cgibin
users.py
Go to the documentation of this file.
1
#! /usr/bin/env python
2
3
"""
4
usage: %(progname)s [args]
5
"""
6
7
import
nstart
8
9
import
os, sys, string, time, getopt, re
10
from
pyclearsilver.log
import
*
11
12
import
neo_cgi, neo_util, neo_cs
13
14
from
pyclearsilver
import
CSPage
15
from
pyclearsilver
import
odb
16
17
import
MBPage
18
import
db_webui
19
from
auth
import
db_auth
20
21
import
roslib
22
import
roslib.scriptutil
23
#import rospy
24
import
webutil
25
26
class
MyPage
(
MBPage.MBPage
):
27
def
setup
(self, hdf):
28
self.
db
= db_webui.initSchema()
29
self.
auth_db
= db_auth.initSchema()
30
31
def
display
(self, hdf):
32
webutil.set_tabs(hdf, [
"admin"
,
"users"
])
33
#users = self.auth_db.getAllUsers()
34
user_records = self.auth_db.users.fetchAllRows()
35
user_records.hdfExport(
"CGI.cur.users"
, hdf)
36
37
def
Action_DeleteUser
(self, hdf):
38
username = hdf.getValue(
"Query.username"
,
""
).strip()
39
row = self.authdb.users.lookup(username=username)
40
row.delete()
41
self.
redirectUri
(
"users.py"
)
42
43
def
run
(context):
44
return
MyPage
(context, pagename=
"users"
, nologin=
False
)
45
46
def
main
():
47
context = CSPage.Context()
48
run
(context).
start
()
49
50
if
__name__ ==
"__main__"
:
51
main
()
webui.mod.webui.cgibin.users.main
def main()
Definition:
users.py:46
webui.startcgi.start
start
Definition:
startcgi.py:4
webui.mod.webui.cgibin.users.MyPage.Action_DeleteUser
def Action_DeleteUser(self, hdf)
Definition:
users.py:37
pyclearsilver::log
webui.MBPage.MBPage.db
db
Definition:
MBPage.py:32
pyclearsilver::CSPage::CSPage::redirectUri
def redirectUri(self, redirectTo)
webui.MBPage.MBPage
Definition:
MBPage.py:18
webui.mod.webui.cgibin.users.run
def run(context)
Definition:
users.py:43
webui.mod.webui.cgibin.users.MyPage.setup
def setup(self, hdf)
Definition:
users.py:27
webui.mod.webui.cgibin.users.MyPage
Definition:
users.py:26
webui.mod.webui.cgibin.users.MyPage.auth_db
auth_db
Definition:
users.py:29
webui.mod.webui.cgibin.users.MyPage.display
def display(self, hdf)
Definition:
users.py:31
webui
Author(s): Scott Hassan
autogenerated on Mon Jun 10 2019 15:51:24