mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-26 01:16:01 +03:00
[GH-ISSUE #937] Broken User #803
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#803
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hennedo on GitHub (Oct 10, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/937
Originally assigned to: @tonioo on GitHub.
I have some broken users, as a SuperAdmin i cannot delete those, or change their role from SimpleUser to DomainAdmin (which the user was before I degraded him to SimpleUser..)
For example the user with id=24:
I get the following error, when debug=true
This seems to be looking for an owner of the "User" object, so i should mention, that I deleted the default admin user, with which I created this user. But I can't recall if the User was broken after this, or sometime before.
Since it dies expecting to be "owner" a user(?) I followed the function call to get_object_owner in lib/permissions.py, where the try gets catched and returns None...
After some digging, I executed the following SQL query
UPDATE core_objectaccess SET is_owner=true WHERE id=321;since then it seems to work.
I searched for object_id=24 and content_type_id=9 because those were the values, which i got from debugging the get_object_owner method.
Not shure what I did though... :-D
Any idea on how this happened and what i did wrong? (and: did I make it worse with the query?)
Thanks!
@tonioo commented on GitHub (Oct 10, 2016):
That's indeed a strange issue... How did you remove the default admin ?
@hennedo commented on GitHub (Oct 10, 2016):
by giving my own user (with a mailbox) superAdmin rights and then using this user, I clicked on delete. Everything has been done in the Modoboa Webinterface.
@tonioo commented on GitHub (Oct 10, 2016):
With which version of Modoboa ?
@hennedo commented on GitHub (Oct 10, 2016):
1.6.0
@tonioo commented on GitHub (Oct 10, 2016):
Ok, I found the issue. Thanks for reporting, I'll fix it soon :-)