XH 1.6: Logout choice with or without backup

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

XH 1.6: Logout choice with or without backup

Post by cmb » Tue May 14, 2013 7:03 pm

Hello Community,

there was a discussion in a German thread about offering the choice between creating or not creating a backup of the content on logout. This could be done by extending the item "Logout" in the admin menu with two respective subitems.

Shall we do so?

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.6: Logout choice with or without backup

Post by Holger » Tue May 14, 2013 10:09 pm

cmb wrote:Shall we do so?
Hmm, unsure :? .
I think some users will find it useful. But I don't like sub-items for the logout-entry.

What about a JS confirmation "Do you really want to logout?" with a checkbox "don't create backup" below?

Holger

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6: Logout choice with or without backup

Post by cmb » Wed May 15, 2013 12:24 pm

Hi Holger,
Holger wrote:What about a JS confirmation "Do you really want to logout?" with a checkbox "don't create backup" below?
A good alternative; could easily be done by reusing xh.modalDialog() in javascript/admin.js.

Anyway, the main point is, if we should add the basic ability to log out without creating a backup to the core. That would require to catch this case by introducing another GET/POST parameter.

How this possibility is offered to the admin may be somewhat secondary, as we have "a more flexible Adminmenu" already on the roadmap.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: XH 1.6: Logout choice with or without backup

Post by svasti » Wed May 15, 2013 8:22 pm

Holger wrote:What about a JS confirmation "Do you really want to logout?" with a checkbox "don't create backup" below?
Sorry, this seems to me most horrible. If I don't like something, it is these pop ups "do you really want to do what you just tried to do". :evil: :evil: :evil:

I use this function (now via plugin) mostly to check, if on a clients website everything works as expected. It's okay if this function would be hidden, because most users don't need it. It is also the least downloaded of my plugins.

What about offerning Holger's pop up only on clicking Ctrl+Exit?

svasti

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.6: Logout choice with or without backup

Post by Holger » Wed May 15, 2013 8:41 pm

svasti wrote:Sorry, this seems to me most horrible. If I don't like something, it is these pop ups "do you really want to do what you just tried to do".
Hehe, always a question of taste.
And it took me hours to get this confirmation in CKEditor if you leave the editor without saving ;) .

IMO both versions, the modal and the sub-items, are not "really nice".
I've not yet checked how you've solved that in your plugin, I'll try it.

The simplest solution for me to logout without a backup was just a single click on the "X" in the upper right corner of the browser-window (and setting the amount of backups to a much higher value).

So I'll propose we leave that feature in 3rd-party plugin, since it's available anyway.

Holger

PS: Mabe it's a good idea to offer the no-backup feature by sth. like Ctrl+Exit?
Last edited by Holger on Wed May 15, 2013 8:42 pm, edited 1 time in total.
Reason: Added PS

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6: Logout choice with or without backup

Post by cmb » Wed May 15, 2013 9:02 pm

svasti wrote:Sorry, this seems to me most horrible. If I don't like something, it is these pop ups "do you really want to do what you just tried to do".
A good point. But at least sometimes I consider them very valuable (such as the case Holger mentioned: leaving an edited page without saving).
Holger wrote:The simplest solution for me to logout without a backup was just a single click on the "X" in the upper right corner of the browser-window (and setting the amount of backups to a much higher value).
I sometimes just delete the cookies (what's basically the same), but actually I don't like that. It's always possible that a plugin catches the logout to do something useful (e.g. Keymaster_XH takes back the "key" when the user logs out; without that action being taken, the next login has to wait until the "key" has "expired").
Holger wrote:So I'll propose we leave that feature in 3rd-party plugin, since it's available anyway.
The reason for this thread were some users, who wished to have the logout without backup not in the plugin back-end, but in the admin menu.
svasti wrote:What about offerning Holger's pop up only on clicking Ctrl+Exit?
Holger wrote:Mabe it's a good idea to offer the no-backup feature by sth. like Ctrl+Exit?
I'd rather avoid using such keyboard shortcuts. AFAIK not all computers have a CTRL key, and the recognition with JavaScript might have some issues (not sure, however).

So what about:
cmb wrote:Anyway, the main point is, if we should add the basic ability to log out without creating a backup to the core. That would require to catch this case by introducing another GET/POST parameter.

How this possibility is offered to the admin may be somewhat secondary, as we have "a more flexible Adminmenu" already on the roadmap.
IOW: only the possibility to log out with a backup could be offered by the core, but we don't have to make this feature immediately available.
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3470
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany

Re: XH 1.6: Logout choice with or without backup

Post by Holger » Wed May 15, 2013 9:25 pm

cmb wrote: I sometimes just delete the cookies (what's basically the same), but actually I don't like that. It's always possible that a plugin catches the logout to do something useful (e.g. Keymaster_XH takes back the "key" when the user logs out; without that action being taken, the next login has to wait until the "key" has "expired").
I know - that's why I wrote "was".
And I must say that an extension like KeyMaster is really useful - even if we're speaking about a single-user system.

So I'll agree with that
cmb wrote:IOW: only the possibility to log out with a backup could be offered by the core, but we don't have to make this feature immediately available.
to make things easier in future releases.

Holger

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6: Logout choice with or without backup

Post by cmb » Wed May 15, 2013 9:42 pm

Holger wrote:I know - that's why I wrote "was".
Sorry, I missed that.
Holger wrote:And I must say that an extension like KeyMaster is really useful - even if we're speaking about a single-user system.
For me single-user system doesn't mean that there can't be several (actually a few) users sharing the administration of a website. It just means, that there is no user management with different roles and permissions.

Actually I consider Keymaster_XH (as well as LoginLocker) merely a workaround. There are too many issues, which can't be solved reasonably, see http://3-magi.net/plugins/keymaster/hel ... imitations; and there is another limitation I have not documented yet: after changing the password, the website is locked until timeout.

So my remark from http://www.cmsimpleforum.com/viewtopic. ... 897#p34710 still holds:
Note that I consider neither Keymaster_XH nor LoginLocker a good solution for a multiple admin situation. IMO the core of CMSimple_XH and the plugins should be adjusted to cater for multiple admins simultaneously editing the site. I'm quite convinced, that a simple optimistic locking strategy will fit best.
See http://www.cmsimpleforum.com/viewtopic.php?f=29&t=5855 for how this might be done. Note that I don't consider this a high priority issue, but we may keep it in mind.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XH 1.6: Logout choice with or without backup

Post by cmb » Tue Jun 11, 2013 3:44 pm

Hello Community,

I've kept this simple by skipping the backup, if the value of the "logout" parameter is "no_backup" (r583). So an extension can simply offer an appropriate link or form, and even without extension a user who wants to log out without letting CMSimple_XH create a backup can do so by requesting ?logout=no_backup.

This change is compatible with all existing extensions, which just check for $logout instead of $logout=='true'[1]. Keymaster_XH 1beta2 does the latter, but I've already changed that in my repository (will be included in the next version).

[1] $logout == 'true', if there is no value given for the "logout" GET parameter. If a value is given (other than "true"), or "logout" is a POST parameter, then $logout != 'true', but the logout happens nonetheless. So checking just for $logout is better, anyway.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Ulrich

Re: XH 1.6: Logout choice with or without backup

Post by Ulrich » Tue Jun 11, 2013 4:16 pm

Just an idea -
lets put an option to the config section

logout without backup true or false - if true - the core will generate a backup until x numbers of backup are created- then it will start at the beginning and overwrite the oldest backups.

If a fiddle around with the layout or the template or whatever, i always create a backup of a stable, running system , then do my mods and if pleased do another backup.

the backup option is imo just for the setup and the configuration, but not for daily work.

Ulrich

Post Reply