P2 user check

Richard Fairhurst richard at systemeD.net
Wed Dec 19 10:07:51 GMT 2012


[sent to potlatch-dev@ and rails-dev@, please trim follow-ups if 
appropriate]

I've added a new embedding option to Potlatch 2 that can warn the user 
if they attempt to save a changeset which is mostly deletions.

The option is selected like this:

	args["user_check"] = "warn";

The value can be "warn" or "prevent". If the former, the user is 
presented with a modal warning dialogue (select "Yes" or [default] 
"Cancel") when trying to save a destructive changeset. If the latter, 
the dialogue only gives the "Cancel" option.

Code is at 
https://github.com/systemed/potlatch2/commit/55b43b43be26dcb239624aff2898a332616bbb05 
.

rails-dev people might like to consider whether, for example, osm.org 
could set "warn" or even "prevent" on all users with fewer than 5 
changesets.

cheers
Richard




More information about the rails-dev mailing list