Re: Proposal: "Last modified by"
Raphael Ritz <[email protected]> Thu, 07 Sep 2006 09:17:39 +0200
| Newsgroups | gmane.comp.web.zope.plone.archetypes.devel |
|---|---|
| Organization | Humboldt-University Berlin |
| Message-ID | <[email protected]> |
Dorneles Trem=E9a schrieb:
[..]
> =
> What do you guys think about this pretty straight-forward changes to
> Archetypes?
Would be fine with me.
And while we are at this: another straight-forward addition
from here would be to also build up something like a modification
history (potentially limited to a configurable maximum of entries).
Raphael
> =
> Index: Archetypes/ExtensibleMetadata.py
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- Archetypes/ExtensibleMetadata.py (revis=E3o 6655)
> +++ Archetypes/ExtensibleMetadata.py (c=F3pia de trabalho)
> @@ -116,6 +116,11 @@
> description_msgid=3D"help_creators",
> i18n_domain=3D"plone"),
> ),
> + StringField(
> + 'lastEditor',
> + widget=3DStringWidget(
> + visible=3D{'edit':'invisible', 'view':'invisible'}),
> + ),
> DateTimeField(
> 'effectiveDate',
> mutator=3D'setEffectiveDate',
> @@ -458,7 +463,9 @@
> Take appropriate action after the resource has been modified.
> For now, change the modification_date.
> """
> - # XXX This could also store the id of the user doing modificatio=
ns.
> + mtool =3D getToolByName(self, 'portal_membership')
> + editor =3D mtool.getAuthenticatedMember().getId()
> + self.setLastEditor(editor)
> self.setModificationDate(DateTime())
> if shasattr(self, 'http__refreshEtag'):
> self.http__refreshEtag()
> =
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easi=
er
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D1=
21642