xwikisas / application-forum

Forum Application (Pro)
GNU Lesser General Public License v3.0
0 stars 5 forks source link

Can't Delete Forums from the app homepage #37

Closed ane-gabriela closed 5 years ago

ane-gabriela commented 5 years ago

Steps to reproduce:

  1. Click on Forums from the Apps Panel
  2. Click on the Delete button from the livetable to remove a forum (as Admin or as creator of that forum)
  3. Click Yes

Expected results: The forum is deleted.

Actual results: "The forum could not be deletedUnauthorized" appears at the bottom of the page and the Forum is not removed.

Environment: Windows 10, IE 11, XWiki 10.10 with MySQL 5.7

can tdeleteforum

acotiuga commented 5 years ago

In the pre-Nested versions of XWiki, when the Forum application was designed and built, Forum, Topic and Answer entities were sharing the same Forums space and for deleting a Forum, it was necessary to handle in a custom way the deletion of Topics and Answers and for that reason the application ended up with a complex way of doing this job. Meanwhile, the application was adapted to support Nested pages and deleting a Forum page will also delete the other entities thanks to the new hierarchy shape.

The solution I'm proposing for this issue is to get rid of the deletion mechanism and to rely on the simple (default) _actions column in the livetable. This also handles the permissions on the page (Forum) so there's no need to explicitly check the rights.

Note: Also replaces the Delete modal box with the redirect to the Forum page, in delete mode, where details about Affect children are presented (which is the standard delete mechanism in XWiki). See the below images.

Current delete confirmation UI:

currentdeleteui

New delete confirmation UI:

newdeleteconfirmationui

@lucaa and @silviamacovei what do you think about this change?

acotiuga commented 5 years ago

The default behavior in XWiki Standard it to display a list of affected (to be deleted) to from. The pages with no delete rights for the current user are not deleted. In the forum context, we don't want to remove the content at all, if there are other contributors.