[Zope-CMF] Re: renaming /Members
martin f krafft
madduck@madduck.net
Fri, 31 Jan 2003 14:43:36 +0100
--jq0ap7NbKX2Kqbes
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
also sprach martin f krafft <madduck@madduck.net> [2003.01.24.1517 +0100]:
> Is it possible to rename /Members. It should be /people over here and
> they say it's really important to have that changed. I couldn't find
> any reference yet.
here's how:
in all Products/CMF*/MembershipTool.py:
=3D=3D=3D=3D=3D=3D
def createMemberarea(self, member_id):
[...]
parent =3D self.aq_inner.aq_parent
- members =3D getattr(parent, 'Members', None)
+ members =3D getattr(parent, 'people', None)
if members is not None and not hasattr(members, member_id):
=3D=3D=3D=3D=3D=3D
and in Products/CMFDefault/MembershipToo.py:
=3D=3D=3D=3D=3D=3D
def getHomeFolder(self, id=3DNone, verifyPermission=3D0):
[...]
id =3D member.getMemberId()
- if hasattr(self, 'Members'):
+ if hasattr(self, 'people'):
try:
- folder =3D self.Members[id]
+ folder =3D self.people[id]
if verifyPermission and not _checkPermission('View', folder=
):
=3D=3D=3D=3D=3D=3D
that's all. now it works.
--=20
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
=20
NOTE: The pgp.net keyservers and their mirrors are broken!
Get my key here: http://people.debian.org/~madduck/gpg/330c4a75.asc
=20
=2E.. and don't get caught in the .NET!
--jq0ap7NbKX2Kqbes
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+On2IIgvIgzMMSnURAgtrAJ9jM5ezdvJt7U+8//0l6q5Pa38nGACguZvR
y0q9TRdX0Z+zsDD4Iym6IpE=
=uC2l
-----END PGP SIGNATURE-----
--jq0ap7NbKX2Kqbes--