> On 7 May 2018, at 18:18, Thomas Mortagne <[email protected]> wrote:
> 
> On Mon, May 7, 2018 at 5:02 PM, Vincent Massol <[email protected]> wrote:
>> 
>> 
>>> On 7 May 2018, at 16:48, Thomas Mortagne <[email protected]> wrote:
>>> 
>>> On Mon, May 7, 2018 at 4:33 PM, Vincent Massol <[email protected]> wrote:
>>>> Hi,
>>>> 
>>>> It seems we forgot to handle mail template pages. For example 
>>>> XWiki.ResetPasswordMailContent
>>>> 
>>>> We need to decide the type: demo, default, etc.
>>>> 
>>>> WDYT about demo (i.e. as soon as the user starts modifying it, we don’t 
>>>> upgrade it anymore)?
>>>> 
>>>> Thanks
>>>> -Vincent
>>>> 
>>> 
>>> All types with allowed edit prevent upgrade.
>> 
>> I’m not sure we need more than 1 such type. See other mail thread.
>> 
>>> I think a more important question is: is it OK to delete it ?
>> 
>> We could. See below
>> 
>>> 
>>> Seems to me delete is not OK in this context. Unless it's possible to
>>> change the mail template used for password reset ?
>> 
>> Re delete, I think there’s another thread discussing it, no? I don’t 
>> remember the discussion too well and don’t master all the details but AFAIR 
>> my preference was to not prevent deletion in general (I’m worried about 
>> unplanned use cases requiring a delete, like renaming the page to another 
>> place to save it, and then import some XAR containing the new mail template).
>> 
>> IMO all pages should be deletable without endangering the system. In this 
>> case we could imagine:
>> * if the template is missing then the password reset page would mention it 
>> with the ability to create a default mail template
>> * and/or report a mail error in the admin UI when sending the email (since 
>> the template doesn’t exist). This means that the template factory for emails 
>> should check the existence of the page. This should be handled here: 
>> https://github.com/xwiki/xwiki-platform/blob/6e281a093d3751666fdcd3fb3a69cb638cca9b59/xwiki-platform-core/xwiki-platform-mail/xwiki-platform-mail-send/xwiki-platform-mail-send-default/src/main/java/org/xwiki/mail/internal/factory/template/DefaultMailTemplateManager.java#L143
>>  AFAICS it will currently report a NPE….
> 
> As you said, deleting that page would break reset password feature and
> since I don't plan to rewrite it right now it means delete should be
> protected IMO. If someone improve this feature later then the type can
> be changed to "demo".
> 
>> 
>> Have we decided what we do about deletes in general?
> 
> There hasn't been such discussion.

I’m referring to http://markmail.org/message/kjtyzvjp5zzh4gyf (and I’m sure I 
saw another discussion about that but cannot find it ATM).

I still don’t understand why we’re mixing upgradability with deletability (and 
trying to find names that represent both). Aren’t they 2 different topics?

Thanks
-Vincent

> I don't even understand what this
> mean, it's obvious to me that deleting some pages don't break anything
> while for others you are going to create a huge mess.
> 
>> 
>> Thanks
>> -Vincent
>> 
>>> --
>>> Thomas Mortagne
>> 
> 
> 
> 
> -- 
> Thomas Mortagne

Reply via email to