ztfy/utils/security.py
branchZTK-1.1
changeset 83 55e4cb0b7900
parent 71 2512d7fe2cda
child 105 a04b2e6e5830
--- a/ztfy/utils/security.py	Sun Oct 30 02:19:31 2011 +0100
+++ b/ztfy/utils/security.py	Tue Nov 01 18:27:52 2011 +0100
@@ -19,14 +19,15 @@
 from persistent.dict import PersistentDict
 
 # import Zope3 interfaces
-from zope.app.authentication.interfaces import IPrincipalInfo
 from zope.authentication.interfaces import IAuthentication
+from zope.pluggableauth.interfaces import IPrincipalInfo
 
 # import local interfaces
 
 # import Zope3 packages
 from zc.set import Set
 from zope.component import getUtility
+from zope.deprecation.deprecation import deprecate
 from zope.interface import implements
 from zope.security.proxy import removeSecurityProxy
 
@@ -52,6 +53,7 @@
     return result
 
 
+@deprecate("ztfy.utils.security.MissingPrincipal is deprecated. Use ztfy.security.search.MissingPrincipal class instead.")
 class MissingPrincipal(object):
 
     implements(IPrincipalInfo)
@@ -68,6 +70,7 @@
         return _("This principal can't be found in any authentication utility...")
 
 
+@deprecate("ztfy.utils.security.getPrincipal is deprecated. Use ztfy.security.search.getPrincipal function instead.")
 def getPrincipal(uid):
     principals = getUtility(IAuthentication)
     try: