Make adminon/adminoff point to SSL pages.

This commit is contained in:
Max Goodman
2012-10-03 02:03:49 -07:00
parent 41dcb2c924
commit 9ab5856d37
2 changed files with 6 additions and 8 deletions

View File

@@ -82,8 +82,6 @@ menu = MenuHandler(hot = _('hot'),
autobanned = _("autobanned"),
# reddit header strings
adminon = _("turn admin on"),
adminoff = _("turn admin off"),
prefs = _("preferences"),
submit = _("submit"),
help = _("help"),

View File

@@ -383,13 +383,13 @@ class Reddit(Templated):
if c.user_is_loggedin:
if c.user.name in g.admins:
if c.user_is_admin:
buttons += [NamedButton("adminoff", False,
nocname=not c.authorized_cname,
target = "_self")]
buttons += [OffsiteButton(_("turn admin off"),
dest=g.https_endpoint + "/adminoff",
target = "_self")]
else:
buttons += [NamedButton("adminon", False,
nocname=not c.authorized_cname,
target = "_self")]
buttons += [OffsiteButton(_("turn admin on"),
dest=g.https_endpoint + "/adminon",
target = "_self")]
buttons += [NamedButton("prefs", False,
css_class = "pref-lang")]
else: