Welcome to Squishdot Websites Squishdot How-To
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


addPostingForm and searchForm Author Information
How-To Posted by on Thursday October 03, 04:00PM, 2002
from the Zopenewbie dept.
How to have an authenticated user show up on the addPostingForm and only local roles show up in the user pull down list on searchForm.

I have several squishdot sites on my intranet. Instead of having people enter author and email information I have setup the field to automatically include their username and email addresses, as follows:



and



and

in the searchForm I've set up a author pull down list as follows:



My dilemma is this:

1. For the username, I want squishdot to allow me to make it so that it isn't an entry field and the username is just displayed. But when I've manipulated this code, I get posting errors because it's looking for something I can't figure out. I don't want users to be able to change the username to someone else's...it automatically posts the username for whomever is logged in.

2. Ditto for the email field.

3. For some squishdot boards I have limited access to its parent folder/container with the local role of TEAMMEMBER. I want to make it so that only those who are allowed access to that folder and its squishdot site appear in the username/author pulldown list and not the entire usernames list. How do I do this?

Grateful for any help!

<  |  >

 

Related Links

The Fine Print: The following comments are owned by whoever posted them.
( Reply )

Re: addPostingForm and searchForm Author Informati
by on Monday October 07, 11:06PM, 2002

This isn't a very squishdot savy way to solve the problem but it worked for me. I just set the input field's type to "hidden" and then displayed the name variable in it's place. That way the form still gets the value and the python validator doesn't act up.

Here is an example of the code:

Your Name


You could do the same thing for the email field.

Thanks for you code example this really helped me figure this out.

[ Reply to this ]
  • Re: addPostingForm and searchForm Author Informati
    by on Tuesday October 08, 06:55PM, 2002
    Thank you! I was having a serious brain cramp. Now that that issue is resolved, anyone have any ideas about how to have local roles users show up on the search form instead of the entire user list?
    [ Reply to this ]
Re: addPostingForm and searchForm Author Information
by on Wednesday October 09, 12:11PM, 2002
Here is one way to get users with a specific role.















There is probably an easier way, but this works.
[ Reply to this ]
  • Re: addPostingForm and searchForm Author Informati
    by on Thursday October 10, 12:41AM, 2002
    Yuk!

    That really should be a python script at the very least:

    acl_users = context.acl_users
    for user in acl_users.getUserNames():
     for role in acl_users.getUser(user).getRoles()
      if role == 'TEAMMEMBER':
       print ""+user+"
    "

    ...but even so, I'm sure there's a better way.

    cheers,

    Chris

    [ Reply to this ]

 
The Fine Print: The following comments are owned by whoever posted them.
( Reply )

Powered by Zope  Squishdot Powered
  "Any system that depends on reliability is unreliable." -- Nogg's Postulate
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 , ©2000-2002 .