[Zope] Changing user pwds

2000-08-07 Thread Aaron Williamson

Hello,

I created a form to allow users to change their own passwords.  I
hate the idea of giving them all "Manage Users" permissions, but ok
whatever.  But "acl_users.manage_users('Change', REQUEST, RESPONSE)"
won't work unless the user has "View Management Screens" permissions.
Not only does this make no sense, because the procedure doesn't involve
viewing management screens, but it would be absolute insanity to give
all of my users those permissions, because then they could go in and
delete users at will!  There has to be a way to do this, but can I get
around this problem without additional products (i.e. Login Manager)?

Thanks,

  Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] ZCatalog updating

2000-07-31 Thread Aaron Williamson

I am convinced this is a stupid question that has been answered a
hundred times already, but after scouring zope.org and the archives, I
still don't know the answer, so...

How can I automatically update my ZCatalog when items have been
added/modified/changed?

Thanks for any help,

Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Creating folders in LocalFS

2000-07-17 Thread Aaron Williamson

I have a LocalFS object within a directory, and in the same directory I
have a method which I want to use (among other things) to create new
folders within the LocalFS object, which is called "pictures."  If I try
pictures.manage_addFolder(id) the folder gets stuck in the directory it
is called from, not in pictures.  There doesn't seem to be any specific
docs on this, so I am at a loss.  Any pointers would be greatly
appreciated.

--Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] Variable sort in dtml-in

2000-07-14 Thread Aaron Williamson

 I have attached appropriate patch for dtml-in tag for Zope 2.2.0b3/b4
 (Of course this patch was checked and works ok).

Thanks again for the patch.  It is a much needed option (and rather a glaring omission 
from
the original code).  So far it is working flawlessly for me.

 I want extend my proposal to others attributes like eg. size:

 dtml-in SQL_search sort="expr:in_sort_by"
   size="expr:REQUEST.user_list_size" 
start=query_start

Is this necessary?  I actually use a variable for size (size=list_size) in the same 
dtml-in,
and that part seems to work just fine.  Maybe mine is a special case, but I don't 
think so.

 It is possible easy extend other DTML tags through the same way  too,
 but I dont know what other zopistas (especcially from DC)  thinks about this.

I for one am for it.  The lack of multiple and variable sort keys in version 2.14 were 
a major
hindrance to me.  I am sure that many tags could benefit from similar improvements.

Thanks again,

Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] testing for local roles

2000-07-14 Thread Aaron Williamson

Brian Lloyd wrote:

 dtml-if "AUTHENTICATED_USER.has_role(('Manager','siteManager'),
 this())"
   ...
 /dtml-if

Well, while we're on the subject of AUTHENTICATED_USER.has_role, I've
just come upon an error that just popped up all of a sudden in an SQL
query that was working fine before.  The problematic line is:

dtml-if "AUTHENTICATED_USER.has_role('Manager',this())"

and the error I get when trying to test it is:

Error, exceptions.NameError: AUTHENTICATED_USER
SQL used:
Could not render the query template!

The last line of the traceback:

  File /usr/local/Zope22b4/lib/python/DocumentTemplate/DT_Util.py, line
337, in eval
(Object: AUTHENTICATED_USER.has_role('Manager',this()))
(Info: this)
  File string, line 0, in ?

Another query in the same folder uses the exact same if statement, and
works fine.  I am running 2.2b4.  Can anyone suggest a solution?

Thanks,

Aaron




___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] I want to assign the values of parameters in a form to another parameter in the same form?

2000-07-13 Thread Aaron Williamson

Sean G Richards wrote:

 Dear Zope list,
 I want to cat the values of parameters, all strings, in a form to
 another parameter in the same form.  How would I go about doing this
 using dtml?

I tested using this:

dtml-call "REQUEST.set('foo','this is a string')"
dtml-call "REQUEST.set('bar','so is this')"
dtml-call "REQUEST.set('foobar',foo+bar)"

and it worked, so I guess you could just use

dtml-call "REQUEST.set('all_params', param1+param2+etc...

Is that what you wanted?

--Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Variable sort in dtml-in

2000-07-13 Thread Aaron Williamson

In my search form, I have a selection box "in_sort_by" whose value can
be "Category", "Field", or "Title".  I am trying to make dtml-in sort by
this value.  I am using:

 dtml-in SQL_search sort="_['in_sort_by']" size=list_size
start=query_start

And I've tried other variations, but I always get an attribute error.
The strange thing to me is that list_size is also a variable and it
works fine, but I've tried just using in_sort_by and that doesn't work.
What am I missing here?

Many thanks,

Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] MySQL LIKE operator

2000-07-12 Thread Aaron Williamson

Hello,

I'm writing a search query to a MySQL database.  I want to keep
people from screwing around with my database by running searches like ";
delete from ... yada yada.  So I should use dtml-sqlvar, right?  But
what if I want to use LIKE?
  If I say:  WHERE goo LIKE "%dtml-sqlvar name=bar type=string%"  then
effectively I am saying: WHERE goo LIKE "%'somestring'%".  In other
words, it will match only the string with the single quotes.  I hope
this makes sense.  Has anyone faced a similar problem?
  Thanks for any help

--Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




[Zope] Current Year

2000-07-11 Thread Aaron Williamson

I hate to sound like such a newbie, but I am having the darndest time
trying to figure out how to get the current year.  I know that the
current time is ZopeTime, but I have tried every way I can think of to
get the year() function to work with it, and at last have given up.  The
documentation I have found is vague at best (imagine).  Please help.

--Aaron


___
Zope maillist  -  [EMAIL PROTECTED]
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 )