[Zope] user not authenticating
Chris McDonough
chrism@digicool.com
Fri, 14 Jan 2000 03:18:30 -0500
Timothy,
It sounds like the DTML you're using to show the edit button isn't
comparing the right things to each other...
I would __probably__ work up something like this DTML to check if the
currently-logged-in user should see something he has authored or not:
<dtml-if "AUTHENTICATED_USER.has_role(['Owner'], theObject)">
<dtml-var dtEditButton>
</dtml-if>
Where theObject is the object id of the article and dtEditButton is the
edit button stuff. Note that I haven't tested this.
Timothy Wilson wrote:
>
> Hi everyone,
>
> I've got a system whereby a person has to have a username and password to
> submit a news item. Later, when that person is viewing the homepage, any
> news items that they've submitted are supposed to display an "edit" button
> that they can use to, you guessed it, edit the item. This works perfectly
> for me as manager.
>
> The weird thing is that when I go the the submission page, I get
> challenged for a password, I put in the name and password of one of the
> non-Manager users, type the article, publish it, but no cool "Edit"
> button. I put a <dtml-var AUTHENTICATED_USER> tag in the article body to
> try to see who Zope thinks I am and found that AUTHENTICATED_USER is still
> Anonymous even when I've successfully entered a password to submit the
> article. Am I making sense? (It's getting late.) So it seems I'm
> authenticating enough to submit an article but AUTHENTICATED_USER isn't
> being changed.
>
> What am I missing?
>
> -Tim
>
> --
> Timothy Wilson | "The faster you | Check out:
> Henry Sibley H.S. | go, the shorter | http://slashdot.org/
> W. St. Paul, MN, USA | you are." | http://linux.com/
> wilson@visi.com | -Einstein | http://www.mn-linux.org/
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
--
Chris McDonough
Digital Creations, Inc.
Zope - http://www.zope.org