bugSamizdat - Bugs: bug #20305, anonymous user invited to choose...

 
 

bug #20305: anonymous user invited to choose focus and then ignored + proposed fix

Submitter:  Boud Roukema <boud>
Submitted:  Sat 30 Jun 2007 11:36:06 PM UTC
   
 
Category:  None Severity:  3 - Normal
Status:  Fixed Privacy:  Public
Assigned to:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 04 Nov 2007 01:22:19 PM UTC, comment #3: 
Boud Roukema <boud>
Group Member
Mon 20 Aug 2007 11:05:38 PM UTC, comment #2: 

seems ok to me

Boud Roukema <boud>
Group Member
Sat 18 Aug 2007 06:03:39 PM UTC, comment #1: 

Fixed in snapshot 2007-08-18.

Dmitry Borodaenko <angdraug>
Group administrator
Sat 30 Jun 2007 11:36:06 PM UTC, original submission:  

PROBLEM: In 070618-1 or earlier (since 070501?), in both the basic and advanced interfaces, when publishing an article, an anonymous user ("guest") is given an option "Select focus that this resource will be related to". If s/he does choose a focus, then that focus is ignored at the preview stage and in turn after confirmation.

DISCUSSION:
This is likely to be frustrating to anonymous users. Either we could choose to allow anonymous users to choose one focus when publishing (without allowing them to add new foci), or we should not give them a select box for choosing a focus.

i don't have a strong feeling one way or the other. However, since config.yaml says, "Guests are never allowed to vote." we should be consistent with this - either change this comment or else hide the select box. For simplicity, i chose the latter.

PROPOSED FIX (vs 070618-1):

The proposed fix is in application_helper, to not propose a
focus selection to a guest user.


--- /tmp/tmp_snapshot/samizdat/lib/samizdat/helpers/application_helper.rb        2007-06-17 17:14:42.000000000 +0200
+++ /usr/lib/ruby/1.8/samizdat/helpers/application_helper.rb        2007-07-01 00:52:58.994326896 +0200

@@ -191,9 +191,15 @@
       focuses.unshift( [(focus.id or focus.uriref), focus.name] )
     end
     focuses.unshift [nil, _('SELECT FOCUS')]
-    fields =
-      [ [:label, 'focus', _('Select focus that this resource will be related to')],
+
+    if @request.access('vote')
+      fields =
+        [ [:label, 'focus', _('Select focus that this resource will be related to')],
           [:select, 'focus', focuses, (focus ? (focus.id or focus.uriref) : nil)] ]
+    else
+      fields = []
+    end
+
     if advanced
       fields.push(
         [:label, 'focus_id', _("Enter focus id if it's not in the list")],


Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by angdraug (Posted a comment)
  • -email is unavailable- added by boud (Submitted the item)
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-04 boud Open/ClosedOpen Closed
    2007-08-18 angdraug StatusWorks For Me Fixed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code