Re: Deleting an id-less user
from
Eric Thomas
on Mar 03, 2007 02:44 AM
Eric Thomas <eric@...> writes:
>
>
>
> I've recently installed remember on a Plone 2.5.2 site and appear to be
having problems with an old user account I created.
>
> In ZMI, /acl_users/source_users shows the following:
>
> User ID Login Name
> Password tester
>
> Notice, there is no User ID. If I try to select this user and press 'Remove
Users', nothing changes and there are no related log messages.
>
> So, I tried a manual method (I'm not 100% that this is a valid approach):
>
> >>> acl_users.userFolderDelUsers('tester')Traceback (most recent call
last): File "<stdin>", line 1, in ? File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/pas.py", line 58, in _doDelUsers
> self._doDelUser(name) File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/pas.py", line 76, in _doDelUser
userdeleter.doDeleteUser(id) File "/home/zope-
carechurch/zope/dev/Products/membrane/plugins/usermanager.py", line 269, in
doDeleteUser
> raise RuntimeError, 'No adapter found for user: %s'%loginRuntimeError:
No adapter found for user: t>>>
>
> I've also noticed that the PlonePAS tests faile 6 of the tests. I'm hoping
these failures are related to the id-less user. PlonePAS test output is below.
>
> Any suggestions on how I can get rid of this user?
>
> Thanks,
> Eric
>
>
> Failure in test test_searchMissingInfo
(Products.PlonePAS.tests.test_basic_ops.BasicOpsTestCase)Traceback (most
recent call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_basic_ops.py", line 145, in
test_searchMissingInfo self.failIf(len(retlist) != 0)
File "/usr/lib64/python2.4/unittest.py", line 305, in failIf
> if expr: raise self.failureException, msgAssertionError
> ..
> Failure in test test_getUser_is_cached
(Products.PlonePAS.tests.test_caching.BasicOpsTestCase)Traceback (most recent
call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_caching.py", line 83, in
test_getUser_is_cached self.assertEquals(collector.results, [None] * len
(collector.results
> )) File "/usr/lib64/python2.4/unittest.py", line 333, in
failUnlessEqual raise self.failureException, \AssertionError: [None, None,
{'editurl': 'source_users/manage_users?
user_id=created_user', 'login': 'created_user', 'pluginid': 'source_users', 'id
': 'created_user'}, <PloneUser 'created_user'>] != [None, None, None, None]
>
> .............................../usr/lib64/zope-
2.9.5/lib/python/OFS/subscribers.py:74: DeprecationWarning:
Products.PluggableAuthService.PluggableAuthService.PluggableAuthService.manage_
beforeDelete is deprecated and will be removed in Zope
> 2.11, you should use event subscribers instead, and meanwhile mark the class
with <five:deprecatedManageAddDelete/> DeprecationWarning).
> Failure in test test_migrate_no_user_folder_populated_users
(Products.PlonePAS.tests.test_migration.MigrationTest)Traceback (most recent
call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 211, in
test_migrate_no_user_folder_populated_users self.checker.run
('checkUserFolder', 'checkUsers')
> File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 178, in
run getattr(self, name)() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 106, in
checkUsers
> self.tc.failIf(user is None, uid)
File "/usr/lib64/python2.4/unittest.py", line 305, in failIf if expr: raise
self.failureException, msgAssertionError: user1
> .
> Failure in test test_migrate_normal_uf_no_group_tools
(Products.PlonePAS.tests.test_migration.MigrationTest)Traceback (most recent
call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 225, in
test_migrate_normal_uf_no_group_tools self.checker.run
('checkUserFolder', 'checkUsers')
> File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 178, in
run getattr(self, name)() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 106, in
checkUsers
> self.tc.failIf(user is None, uid)
File "/usr/lib64/python2.4/unittest.py", line 305, in failIf if expr: raise
self.failureException, msgAssertionError: user1
> .
> Failure in test test_migrate_populated
(Products.PlonePAS.tests.test_migration.MigrationTest)Traceback (most recent
call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 234, in
test_migrate_populated self.checker.run
('checkUserFolder', 'checkUsers', 'checkGroups')
> File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 178, in
run getattr(self, name)() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 106, in
checkUsers
> self.tc.failIf(user is None, uid)
File "/usr/lib64/python2.4/unittest.py", line 305, in failIf if expr: raise
self.failureException, msgAssertionError: user1
> .
> Failure in test test_migrate_populated_gruf_no_group_tools
(Products.PlonePAS.tests.test_migration.MigrationTest)Traceback (most recent
call last): File "/usr/lib64/zope-
2.9.5/lib/python/Testing/ZopeTestCase/profiler.py", line 98, in __call__
> testMethod() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 246, in
test_migrate_populated_gruf_no_group_tools self.checker.run
('checkUserFolder', 'checkUsers')
> File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 178, in
run getattr(self, name)() File "/home/zope-
carechurch/zope/dev/Products/PlonePAS/tests/test_migration.py", line 106, in
checkUsers
> self.tc.failIf(user is None, uid)
File "/usr/lib64/python2.4/unittest.py", line 305, in failIf if expr: raise
self.failureException, msgAssertionError: user1
> .. Ran 46 tests with 6 failures and 0 errors
>
>
Ok, I finally managed to remove the user using:
$ ./zopectl debug
>>> app.myportal.acl_users.source_users.doDeleteUser('')
>>> import transaction
>>> transaction.get().commit()
However, the PlonePAS tests still fail with the same results. Is this normal?
Regards,
Eric