samizdat-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Snapshot: 2007-06-17


From: boud
Subject: Re: Snapshot: 2007-06-17
Date: Mon, 18 Jun 2007 01:54:24 +0200 (CEST)

hi dmitry, all,

On Sun, 17 Jun 2007, Dmitry Borodaenko wrote:

Today's snapshot includes antispam patch by Boud (a bit refactored),
fix for #20134 and another similar bug, and updated translations
(again thanks to Boud). CVS and raw tarball on Savannah updated,
expect updated package in Debian/experimental in an hour or two.


Do you realise that the fix for #20134 makes "open for editing" articles
open for anonymous users as well?

i initially got myself a bit confused trying to think this through in
my head, i think it's because of the double negatives and a mix of and
and or. ;)


in message_controller.rb:

TRUTH TABLES for the case for REJECTING AN EDIT:
i rewrote the three conditions more intuitively as below:

my proposal was:

-    if @session.member.nil? or
       @message.creator.id != @session.member and not @message.open


* guest             T  T  T  T  F  F  F  F
* not creator T T F F T T F F * not wiki T F T F T F T F
RESULT              t  t  t  t  t  f  f  f

so t = edit is rejected, f = edit is not rejected, i.e. it's accepted


in 070617:

+    if not @message.open and
+      (@session.member.nil? or @message.creator.id != @session.member)
+

* guest             T  T  T  T  F  F  F  F
* not creator T T F F T T F F = t t t t t t f f

* not wiki          T  F  T  F  T  F  T  F
FINAL RESULT        t  f  t  f  t  f  f  f


The difference is the two cases:
(guest, not creator, not not wiki) = (guest, not creator, wiki)
(guest, not not creator, not not wiki) = (guest, creator, wiki)

In my proposal, these two cases lead to t = rejection.
In 070617, both cases (requests for an edit) are f = accepted.


In other words, in my proposal, anonymous users cannot edit wikified articles;
in 070617, they can.

Whether or not the 070617 option is a Good Thing is debatable.

The wikipedia has had great success by allowing "anonymous" edits, but
they do track IP numbers (very publicly!) and those users' edits are
generally treated as less reliable. (For highly disputed articles
(e.g. gwbush ;), sometimes articles get semi-protected, i.e. only
registered users, registered since at least e.g. 3 days, can edit. And since about half a year ago, anonymous users cannot start new articles
on the en.wikipedia, following the complaint by a US newspaper editor who
kicked up a fuss about errors in the entry about him.)

Editing by anonymous users in 070617 requires them to be a little bit
clever - they don't get an edit button to click on.

Do we really want such a "back door"? We would have to change the
label

:label, 'open', _('Editing is open for all members')]

if we want to be honest with the users.


If we agree that the aim is:  editing is allowed if user is non-anonymous
and (either s/he is the author or the article is a wikified article) then
we can write this (sticking to first order classical logic) as:

OK if ( !guest and (is_author or wiki))

= !OK if ( !!guest or !(is_author or wiki))

= !OK if ( guest or !(is_author or wiki))

= !OK if ( guest or (!is_author and !wiki))

= !OK if

( @session.member.nil? or
      ( @message.creator.id != @session.member and not @message.open ) )


Maybe the most intuitively natural way to write it, given that the question
is in what case do we wish to reject an edit request, would be the 3rd line:

!OK if

( @session.member.nil? or
      not ( @message.creator.id == @session.member or @message.open ) )


IMHO if we want to allow anonymous edits of wiki articles through a back door, then we should at least give a configurable option to turn
this off...



cheers
boud




reply via email to

[Prev in Thread] Current Thread [Next in Thread]