5 import os, sys, string, time
10 import neo_cgi, neo_cs, neo_util
11 from MBPage
import MBPage
28 if hdf.getValue(
"Query.dismiss_active_warning",
"") ==
"1":
29 user_record = self.authdb.users.lookup(self.username)
30 user_record.dismiss_notice(
"active_warning")
35 if (
not self.get_active_user())
or self.is_active_user()
or hdf.getValue(
"Query.override",
"") ==
"1":
36 self.make_active_user(hdf)
37 self.ncgi.cookieClear(
"inactive")
40 if hdf.getValue(
"Query.dismiss_active_warning",
"") ==
"1":
41 user_record = self.authdb.users.lookup(self.username)
42 user_record.dismiss_notice(
"active_warning")
47 user_record = self.authdb.users.lookup(self.username)
48 if user_record.notice_dismissed(
"active_warning"):
49 self.make_active_user(hdf)
50 self.ncgi.cookieClear(
"inactive")
54 url = self.http + hdf.getValue(
"HTTP.Host",
"") + config.gBaseURL +
"active/active_warning.py?request=%s" % (neo_cgi.urlEscape(hdf.getValue(
"Query.request",
"")))
59 self.ncgi.cookieSet(
"inactive",
"1")
60 if self.is_active_user():
61 self.remove_active_user()
66 user_record = self.authdb.users.lookup(self.username)
67 notice = hdf.getValue(
"Query.notice",
"")
69 user_record.dismiss_notice(notice)
70 hdf.setValue(
"CGI.cur.value",
"OK")
74 user_record = self.authdb.users.lookup(self.username)
75 notice = hdf.getValue(
"Query.notice",
"")
76 if user_record.notice_dismissed(notice):
77 hdf.setValue(
"CGI.cur.value",
"YES")
79 hdf.setValue(
"CGI.cur.value",
"NO")
82 page =
ActivePage(context, pagename=
"active", nologin=
False)
90 if __name__ ==
"__main__":
def Action_DismissNotice(self, hdf)
def Action_Display(self, hdf)
def Action_MakeInactive(self, hdf)
def Action_MakeActive(self, hdf)
def Action_NoticeDismissed(self, hdf)