logo       

r10770 - trunk/libraries/koala/sources/examples/wiki: msg#00003

Subject: r10770 - trunk/libraries/koala/sources/examples/wiki
Author: hannes
Date: Thu Jun  1 21:24:22 2006
New Revision: 10770

Modified:
   trunk/libraries/koala/sources/examples/wiki/classes.dylan
   trunk/libraries/koala/sources/examples/wiki/wiki.dylan
Log:
Bug: 7219
*use only the user-backend from web-framework.
*fixes the bug that user "foobar" changes everything

Modified: trunk/libraries/koala/sources/examples/wiki/classes.dylan
==============================================================================
--- trunk/libraries/koala/sources/examples/wiki/classes.dylan   (original)
+++ trunk/libraries/koala/sources/examples/wiki/classes.dylan   Thu Jun  1 
21:24:22 2006
@@ -77,7 +77,7 @@
 
 define responder worker-responder ("/worker")
  (request, response)
-  if (user-logged-in?(request) & current-user().access <= 23)
+  if (logged-in(request) & current-user().access <= 23)
     let action = as(<symbol>, get-query-value("action"));
     select (action)
       #"undo" => undo(get-query-value("title"));

Modified: trunk/libraries/koala/sources/examples/wiki/wiki.dylan
==============================================================================
--- trunk/libraries/koala/sources/examples/wiki/wiki.dylan      (original)
+++ trunk/libraries/koala/sources/examples/wiki/wiki.dylan      Thu Jun  1 
21:24:22 2006
@@ -103,7 +103,7 @@
     (page :: <edit-page>, request :: <request>, response :: <response>)
   let title = trim(get-query-value("title") | "");
   let content = get-query-value("page-content") | "";
-  if (~ user-logged-in?(request))
+  if (~ logged-in(request))
     note-form-error("You must be logged in to edit a page.");
     // redisplay edit page.
     dynamic-bind (*title* = title,
@@ -219,19 +219,14 @@
 
 define named-method logged-in? in wiki
     (page, request)
-  user-logged-in?(request)
+  logged-in(request)
 end;
 
 define named-method admin? in wiki
     (page, request)
-  login(request) & current-user().access <= 23;
+  logged-in(request) & current-user().access <= 23;
 end;
 
-define method user-logged-in? (request :: <request>)
-  let session = get-session(request);
-  session & get-attribute(session, #"username");
-end method user-logged-in?;
-
 define method respond-to-get
     (page :: <search-page>, request :: <request>, response :: <response>)
   let search-string = trim(get-query-value("search-terms") | "");
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://www.gwydiondylan.org/mailman/listinfo/gd-chatter



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe