mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
Merge pull request #51 from jvalleroy/fix-user-store
Fix user store, remove some obsolete code
This commit is contained in:
commit
14bbf48c76
@ -88,7 +88,6 @@ class FirstBoot(PagePlugin):
|
||||
action="firstboot",
|
||||
name="whats_my_name",
|
||||
message=message)
|
||||
form.text = '<script type="text/javascript" src="/static/js/md5.js"></script>\n'+form.text
|
||||
form.html("<p>For convenience, your FreedomBox needs a name. It should be something short that doesn't contain spaces or punctuation. 'Willard' would be a good name. 'Freestyle McFreedomBox!!!' would not.</p>")
|
||||
form.text_input('Name your FreedomBox', id="hostname", value=hostname)
|
||||
form.html("<p><strong>Initial user and password.</strong> Access to this web interface is protected by knowing a username and password. Provide one here to register the initial privileged user. The password can be changed and other users added later.</p>")
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
# http://tools.cherrypy.org/wiki/AuthenticationAndAccessRestrictions
|
||||
# on 1 February 2011.
|
||||
|
||||
# TODO: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5
|
||||
|
||||
import cherrypy
|
||||
import urllib, hashlib
|
||||
import cfg
|
||||
|
||||
@ -58,7 +58,6 @@ class UserStore(UserStoreModule, sqlite_db):
|
||||
|
||||
def remove(self,username=None):
|
||||
self.__delitem__(username)
|
||||
self.commit()
|
||||
|
||||
def get_all(self):
|
||||
return self.items()
|
||||
|
||||
@ -37,7 +37,6 @@ class add(FormPlugin, PagePlugin):
|
||||
onsubmit="return md5ify('add_user_form', 'password')",
|
||||
name="add_user_form",
|
||||
message=message)
|
||||
form.text = '<script type="text/javascript" src="/static/js/md5.js"></script>\n'+form.text
|
||||
form.text_input(_("Username"), name="username", value=username)
|
||||
form.text_input(_("Full name"), name="name", value=name)
|
||||
form.text_input(_("Email"), name="email", value=email)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user