[Zope-CMF] Re: Trying to customize CMF login to use email rather than userid

2005-10-14 Thread Florent Guillaume

Deb Lewis wrote:

Have hunted through all the documentation I can find, bumbled around in base
system code, and searched web sites/news groups, still stumped and figure
this must be something others have done, so must be time for plaintive cry
for help.

Objective: trying to customize the standard login_form for a CMF site to let
members log in by entering the email address from their member data rather
than the userid of their account.

Did a revised login_form, have supporting services to map email value from
form input to a userid and detect cases where that's not possible and actual
userid needs to be supplied, but can't figure out where/how to get this
hooked in properly in the ZPublisher/auth/login mechanism so that the form
submit for this page can get the login processed.

Configuration: Zope 2.7.7, CMF 1.4.8; also GRUF (GroupUserFolder) 3.3

Any pointers to tips/solutions would be greatly appreciated.



In a standard user folder, the thing that transforms the authentication 
tokens (login+pw, or here email+pw) into a user object is the 
'authenticate' method. You'd have to patch/subclass it if you used a 
standard user folder, I don't know if GRUF is flexible in that respect.


Note that in the context of CPS, CPSUserFolder can use any field as 
login field, email is indeed a very common need.


Another way would be to hack the cookie crumbler so that it transforms 
the email into the id (by doing a lookup) before passing that info away 
to the user folder. That would be costly, as you'd do the lookup for 
every request.


Another way would be to do the lookup in the login form, then redirect 
to logged_in after having changed the form data.



Florent

--
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Trying to customize CMF login to use email rather than userid

2005-10-14 Thread Deb Lewis
Have hunted through all the documentation I can find, bumbled around in base
system code, and searched web sites/news groups, still stumped and figure
this must be something others have done, so must be time for plaintive cry
for help.

Objective: trying to customize the standard login_form for a CMF site to let
members log in by entering the email address from their member data rather
than the userid of their account.

Did a revised login_form, have supporting services to map email value from
form input to a userid and detect cases where that's not possible and actual
userid needs to be supplied, but can't figure out where/how to get this
hooked in properly in the ZPublisher/auth/login mechanism so that the form
submit for this page can get the login processed.

Configuration: Zope 2.7.7, CMF 1.4.8; also GRUF (GroupUserFolder) 3.3

Any pointers to tips/solutions would be greatly appreciated.

Deb Lewis


___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [CMF-checkins] SVN: CMF/branches/1.5/C CMFSetup: added support for configuring content type registry.

2005-10-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan H. Holek wrote:
> Right, so at what point is the content-type-registry supposed to be 
> added now? Plone Site creation breaks after this checkin with:
> 
>   File "/Users/zope/plonehd/Products/CMFCore/utils.py", line 83, in 
> getToolByName
> raise AttributeError, name
> AttributeError: content_type_registry

Plone needs to kick off a "CMFSetup profile" which creates all the tools
before trying to use them.  Over time, there will be *nothing* left in
the PortalGenerator class:  everything it used to do will be handled in
a profile.

For BBB, we should chat about what actually happens here.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"http://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDT+ew+gerLs4ltQ4RApXjAKCLzQLK4c4qgj5XmYThECDhwIWZ1gCeJlQS
BoyUnKk80KdnhzvnMnmlwRQ=
=jUqu
-END PGP SIGNATURE-
___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: [CMF-checkins] SVN: CMF/branches/1.5/C CMFSetup: added support for configuring content type registry.

2005-10-14 Thread Stefan H. Holek
Right, so at what point is the content-type-registry supposed to be  
added now? Plone Site creation breaks after this checkin with:


  File "/Users/zope/plonehd/Products/CMFCore/utils.py", line 83, in  
getToolByName

raise AttributeError, name
AttributeError: content_type_registry

Thanks,
Stefan


On 14. Okt 2005, at 05:50, Tres Seaver wrote:


Modified: CMF/branches/1.5/CMFDefault/Portal.py
===
--- CMF/branches/1.5/CMFDefault/Portal.py2005-10-13 21:01:27  
UTC (rev 39122)
+++ CMF/branches/1.5/CMFDefault/Portal.py2005-10-14 03:50:12  
UTC (rev 39123)

@@ -278,30 +278,6 @@
 fti = FactoryTypeInformation(**t)
 tool._setObject(t['id'], fti)

-def setupMimetypes(self, p):
-p.manage_addProduct[ 'CMFCore' ].manage_addRegistry()
-reg = p.content_type_registry
-
-reg.addPredicate( 'link', 'extension' )
-reg.getPredicate( 'link' ).edit( extensions="url, link" )
-reg.assignTypeName( 'link', 'Link' )
-
-reg.addPredicate( 'news', 'extension' )
-reg.getPredicate( 'news' ).edit( extensions="news" )
-reg.assignTypeName( 'news', 'News Item' )
-
-reg.addPredicate( 'document', 'major_minor' )
-reg.getPredicate( 'document' ).edit( major="text", minor="" )
-reg.assignTypeName( 'document', 'Document' )
-
-reg.addPredicate( 'image', 'major_minor' )
-reg.getPredicate( 'image' ).edit( major="image", minor="" )
-reg.assignTypeName( 'image', 'Image' )
-
-reg.addPredicate( 'file', 'major_minor' )
-reg.getPredicate( 'file' ).edit( major="application",  
minor="" )

-reg.assignTypeName( 'file', 'File' )
-
 def setupWorkflow(self, p):
 wftool = getToolByName(p, 'portal_workflow', None)
 if wftool is None:
@@ -336,7 +312,6 @@

 self.setupTypes(p, PortalFolder.factory_type_information)
 self.setupTypes(p, Topic.factory_type_information)
-self.setupMimetypes(p)
 self.setupWorkflow(p)

 def create(self, parent, id, create_userfolder):


--
Anything that happens, happens.  --Douglas Adams


___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: problem creating Five views for CMF

2005-10-14 Thread sureshvv

Jens Vagelpohl wrote:


On 14 Oct 2005, at 08:55, sureshvv wrote:


Jens Vagelpohl wrote:


On 13 Oct 2005, at 11:39, pete wrote:
I'll work on converting more content types along the same lines  
over  the next few days on a svn branch.




Can you write-up a brief HOW-TO also please?



There can't be any howto until this is all fleshed out.


Here is a link I just found that is not quite a HOW-TO but may be usable as a 
starter:


http://www.goldeggstack.org/one/Zope3views

Suresh

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


Re: [Zope-CMF] Re: problem creating Five views for CMF

2005-10-14 Thread Jens Vagelpohl


On 14 Oct 2005, at 08:55, sureshvv wrote:


Jens Vagelpohl wrote:


On 13 Oct 2005, at 11:39, pete wrote:
I'll work on converting more content types along the same lines  
over  the next few days on a svn branch.




Can you write-up a brief HOW-TO also please?


There can't be any howto until this is all fleshed out.

jens

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] Re: problem creating Five views for CMF

2005-10-14 Thread sureshvv

Jens Vagelpohl wrote:


On 13 Oct 2005, at 11:39, pete wrote:

I'll work on converting more content types along the same lines over  
the next few days on a svn branch.


Can you write-up a brief HOW-TO also please?

Suresh

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests


[Zope-CMF] CMF Collector: Open Issues

2005-10-14 Thread tseaver
The following supporters have open issues assigned to them in this collector
(http://www.zope.org/Collectors/CMF).

Assigned and Open


  efge

- "CMFSetup: provide non-ascii im- and exports",
  [Accepted] http://www.zope.org/Collectors/CMF/292

- "CMFSetup doesn't correctly detect DCWorkflow on export",
  [Accepted] http://www.zope.org/Collectors/CMF/298


  jens

- "FSPropertiesObject.py cannot handle multiline input for lines, text 
attributes",
  [Accepted] http://www.zope.org/Collectors/CMF/271


  mhammond

- "Windows DevelopmentMode penalty in CMFCore.DirectoryView",
  [Accepted] http://www.zope.org/Collectors/CMF/366


  mj

- "CMFSetup doesn't correctly detect DCWorkflow on export",
  [Accepted] http://www.zope.org/Collectors/CMF/298


Pending / Deferred Issues

- "CMFCalendar weekday locale issue",
  [Pending] http://www.zope.org/Collectors/CMF/237

- "Wrong cache association for FSObject",
  [Pending] http://www.zope.org/Collectors/CMF/255

- "CMFSetup: Windows exports contain CR/LF, LF and even CR newlines",
  [Pending] http://www.zope.org/Collectors/CMF/266

- "PortalCatalog.ZopeFindAndApply should probably also search in 
opaqueItems",
  [Pending] http://www.zope.org/Collectors/CMF/296

- "WorkflowTool should recurse into opaqueItems",
  [Pending] http://www.zope.org/Collectors/CMF/297

- "add External Methods to workflow script handling",
  [Pending] http://www.zope.org/Collectors/CMF/329

- "Can't invalidate skin items in a RAMCacheManager",
  [Pending] http://www.zope.org/Collectors/CMF/343

- "CMFSetup: Workflow Tool export fails with workflows which have scripts",
  [Pending] http://www.zope.org/Collectors/CMF/373

- "CMFCore.Skinnable.SkinnableObjectManager can merge skin data",
  [Pending] http://www.zope.org/Collectors/CMF/375

- "Proxy Roles does't work for a Script using portal_catalog.searchResults",
  [Pending] http://www.zope.org/Collectors/CMF/380

- "WorkflowAction deprecated warning should not printed for WorkflowMethod",
  [Pending] http://www.zope.org/Collectors/CMF/388


Pending / Deferred Features

- "Favorite.py: queries and anchors in remote_url",
  [Pending] http://www.zope.org/Collectors/CMF/26

- "Allow flexible date editing in Event.py (CMFCalendar)",
  [Pending] http://www.zope.org/Collectors/CMF/40

- "DefaultDublinCore should have Creator property",
  [Pending] http://www.zope.org/Collectors/CMF/61

- "Make changeFromProperties accept sequences too",
  [Pending] http://www.zope.org/Collectors/CMF/99

- "path criteria on Topic should honor VHM",
  [Pending] http://www.zope.org/Collectors/CMF/111

- "Document.py: universal newlines",
  [Pending] http://www.zope.org/Collectors/CMF/174

- "Permissions in PortalFolder: invokeFactory()",
  [Pending] http://www.zope.org/Collectors/CMF/175

- "Add condition for transition's action like other action",
  [Pending] http://www.zope.org/Collectors/CMF/207

- "Major action enhancement",
  [Pending] http://www.zope.org/Collectors/CMF/232

- "portal_type is undefined in initialization code",
  [Pending] http://www.zope.org/Collectors/CMF/248

- "Action._listsActions() should be more safe",
  [Pending] http://www.zope.org/Collectors/CMF/253

- "Expose Document text_format metadata",
  [Pending] http://www.zope.org/Collectors/CMF/285

- "customization of type of homefolder on creation",
  [Pending] http://www.zope.org/Collectors/CMF/288

- "Allow contentFilter to use review_state",
  [Pending] http://www.zope.org/Collectors/CMF/294

- "CMFTopic Does Not Cache",
  [Pending] http://www.zope.org/Collectors/CMF/295

- "Wishlist: a flag that tags the selected action.",
  [Pending] http://www.zope.org/Collectors/CMF/301

- "CMFDefault should make use of allowCreate()",
  [Pending] http://www.zope.org/Collectors/CMF/340

- "Nested Skins",
  [Pending] http://www.zope.org/Collectors/CMF/377

- "CatalogVariableProvider code + tests",
  [Pending] http://www.zope.org/Collectors/CMF/378

- "manage_doCustomize() : minor additions",
  [Pending] http://www.zope.org/Collectors/CMF/382



___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests