summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2016-01-30 04:16:23 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2016-02-02 04:22:17 +0100
commitb83ad9d369c21662b0e26dad1e704d3b768b631a (patch)
treeee43aa0729ab631a0e13d39b03c8127009c9b6aa
parent88c4f3a3e2ac16006305e74ed03bd385aab75174 (diff)
downloadweb-b83ad9d369c21662b0e26dad1e704d3b768b631a.tar.gz
web-b83ad9d369c21662b0e26dad1e704d3b768b631a.tar.bz2
web-b83ad9d369c21662b0e26dad1e704d3b768b631a.zip
backend/user: Delete requires an Account now
delete does not support deletion by uid anymore. It requires an Account instance and get the password from the object. So we drop the additional password argument.
-rw-r--r--accounts/backend/user/__init__.py3
-rw-r--r--accounts/backend/user/dummy.py2
-rw-r--r--accounts/backend/user/ldap.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/accounts/backend/user/__init__.py b/accounts/backend/user/__init__.py
index f66c138..af0cc63 100644
--- a/accounts/backend/user/__init__.py
+++ b/accounts/backend/user/__init__.py
@@ -38,7 +38,6 @@ class Backend(object):
* delete an account
>> backend = Backend(app)
>> backend.delete(Account)
- >> backend.delete('foo')
* find accounts
>> backend = Backend(app)
@@ -118,7 +117,7 @@ class Backend(object):
"""
raise NotImplementedError()
- def delete(self, account, password=None, as_admin=False):
+ def delete(self, account, as_admin=False):
"""
Deletes an account permanently.
"""
diff --git a/accounts/backend/user/dummy.py b/accounts/backend/user/dummy.py
index 5f7ad1f..cc43dc5 100644
--- a/accounts/backend/user/dummy.py
+++ b/accounts/backend/user/dummy.py
@@ -92,7 +92,7 @@ class DummyBackend(Backend):
if acc.uid != account.uid]
self._storage.append(deepcopy(account))
- def delete(self, account, password=None, as_admin=False):
+ def delete(self, account, as_admin=False):
"""
Deletes an account permanently.
"""
diff --git a/accounts/backend/user/ldap.py b/accounts/backend/user/ldap.py
index 48cf9eb..da77b29 100644
--- a/accounts/backend/user/ldap.py
+++ b/accounts/backend/user/ldap.py
@@ -115,7 +115,7 @@ class LdapBackend(Backend):
self._unbind()
- def delete(self, account, password=None, as_admin=False):
+ def delete(self, account, as_admin=False):
"""
Deletes an account permanently.
"""