Modify

Opened 10 years ago

Closed 10 years ago

#12034 closed defect (fixed)

User's wiki page should be deleted when user is deleted

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: TracHacksPlugin
Severity: normal Keywords:
Cc: Jun Omae, Steffen Hoffmann, Dirk Stöcker Trac Release:

Description

The User's wiki page should be deleted when the account is deleted.

Attachments (0)

Change History (4)

comment:1 Changed 10 years ago by Ryan J Ollos

Status: newaccepted

Proposed patch:

  • trachacksplugin/0.11/trachacks/web_ui.py

    diff --git a/trachacksplugin/0.11/trachacks/web_ui.py b/trachacksplugin/0.11/tra
    index 66ce345..1cc5e52 100644
    a b class TracHacksHtPasswdStore(HtPasswdStore): 
    714714        pass
    715715
    716716    def user_deleted(self, user):
    717         pass
     717        page = WikiPage(self.env, user)
     718        if page.exists:
     719            page.delete()
     720        else:
     721            self.log.info("Tried to delete page '%s' but it doesn't "
     722                          "exist", user)
    718723
    719724    def user_password_reset(self, user, email, password):
    720725        pass

comment:2 Changed 10 years ago by Dirk Stöcker

I'd test, that at least the initial change to that page was also done by the user, so you don't accidential delete unwanted pages.

comment:3 in reply to:  2 Changed 10 years ago by Steffen Hoffmann

Replying to stoecker:

I'd test, that at least the initial change to that page was also done by the user, so you don't accidential delete unwanted pages.

Yes, some means of protecting pre-exisiting wiki pages would be required, or we would certainly see registrations for users named after standard Trac wiki pages. No fun, if that initially succeeds and automatic purging is effective at some point.

comment:4 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: acceptedclosed

In 14261:

3.0dev: Delete user page when the user is deleted, provided that the page was created by that user. Fixes #12034.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.