plugin account, groupblog: user can erase all their microblogs at once
This commit is contained in:
parent
13586ac57b
commit
f6673e0725
1 changed files with 216 additions and 17 deletions
|
|
@ -154,9 +154,12 @@ class Params(object):
|
|||
if not self.storage.hasProfile(profile):
|
||||
info(_('Trying to delete an unknown profile'))
|
||||
return defer.fail(Failure(exceptions.ProfileUnknownError))
|
||||
if not force and self.host.isConnected(profile):
|
||||
info(_("Trying to delete a connected profile"))
|
||||
return defer.fail(Failure(exceptions.ConnectedProfileError))
|
||||
if self.host.isConnected(profile):
|
||||
if force:
|
||||
self.host.disconnect(profile)
|
||||
else:
|
||||
info(_("Trying to delete a connected profile"))
|
||||
return defer.fail(Failure(exceptions.ConnectedProfileError))
|
||||
return self.storage.deleteProfile(profile)
|
||||
|
||||
def getProfileName(self, profile_key, return_profile_keys = False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue