I'm trying to write a script to e-mail the object's URL after a workflow
transition. The script is following:
obj=sti.object
obj_url = obj.absolute_url()
mMsg = """
A document has been submitted for your review.
The url was %s.
"""
mTo = # some fixed e-mail address
mFrom = # some fixed e-mail address
mSubj = 'Item has transitioned'
message = mMsg % (obj_url)
context.MailHost.send(message,mTo, mFrom, mSubj)
I have mapped the script to "submit" transition, I have set proxy role
as "manager" and owner of the script is admin (defined in Zope).
The problem is with "obj=sti.object":
When "Pending" state has "View" permission for anonymous, everything is
OK. But I need to hide pending documents from public, so our "Pending"
state has no "View" and "Access contents information" permissions for
anonymous. In that case, I get an error saying that privileges are
insufficient when I change the state from 'visible' to 'submitted'.
Why objects must be accesable from anonymous to be able to use
"obj=sti.object"?
Is there any solution?
Thank you for any help and idea.
Jan
[jan.pokorny.vcf]
begin:vcard
fn;quoted-printable:Jan Pokorn=C3=BD
n;quoted-printable:Pokorn=C3=BD;Jan
org;quoted-printable:Univerzita Karlova v Praze;=C3=9Astav v=C3=BDpo=C4=8Detn=C3=AD techniky
email;internet:jan.pokorny@...
x-mozilla-html:FALSE
version:2.1
end:vcard
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users