diff options
author | Simo Sorce <simo@redhat.com> | 2014-09-08 15:55:34 -0400 |
---|---|---|
committer | Patrick Uiterwijk <puiterwijk@redhat.com> | 2014-09-24 20:31:14 +0200 |
commit | 9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f (patch) | |
tree | 556822a7e6ff5847703f3c6640f32530a53d8864 /ipsilon/util/user.py | |
parent | d00990c389e98dc62a59020e4a79cfe657f88f89 (diff) | |
download | ipsilon-9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f.tar.gz ipsilon-9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f.tar.xz ipsilon-9e45a0dda4cfa26b531a423fc8b1c4b10d382a0f.zip |
Refactor the data store a bit
Reduce code duplication, and clearly separates admin and user dbs.
Move plugin wrapper away and let plugin code use native functions.
This patch also changes the indexed data to use a uuid and assumes
2 identical uuid cannot be created concurrently.
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Diffstat (limited to 'ipsilon/util/user.py')
-rwxr-xr-x | ipsilon/util/user.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ipsilon/util/user.py b/ipsilon/util/user.py index 2731d3c..47cb23c 100755 --- a/ipsilon/util/user.py +++ b/ipsilon/util/user.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -from ipsilon.util.data import Store +from ipsilon.util.data import UserStore from ipsilon.util.log import Log import cherrypy @@ -39,8 +39,8 @@ class User(object): self.name = username def _get_user_data(self, username): - store = Store() - return store.get_user_preferences(username) + store = UserStore() + return store.load_options('users', username) def reset(self): self.name = None |