<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2><FONT size=3>Hi,<BR><BR>In the bugtracker/vocabulary.py I'm 
getting errors like:<BR><BR>'PluggableAuthentication' object has no attribute 
'getPrincipals'<BR></FONT></FONT><FONT size=2><FONT size=3></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2># From src/<FONT face="Times New Roman" 
size=3>bugtracker/vocabulary.py</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT>class UserTerm(Persistent):</FONT></DIV>
<DIV><FONT>&nbsp;&nbsp;&nbsp; implements(ITitledTokenizedTerm)</FONT></DIV>
<DIV><FONT>&nbsp;&nbsp;&nbsp; def __init__(self, 
principal):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is safe here, 
since we only read non-critical 
data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; naked = 
removeSecurityProxy(principal)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.principal = {'id': 
naked.id,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'login': 
naked.getLogin(),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'title': 
naked.title,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'description': naked.description}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.value = naked.id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.token = 
naked.id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.title = 
naked.title</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT size=3>class 
UserVocabulary(object):<BR>&nbsp;&nbsp;&nbsp; implements(IVocabulary, 
IVocabularyTokenized)<BR>&nbsp;&nbsp;&nbsp; def __init__(self, 
context):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.auth = 
zapi.principals()<BR>&nbsp;&nbsp;&nbsp; def __contains__(self, 
value):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ids = map(lambda p: p.id, 
self.auth.getPrincipals(''))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return value in ids<BR>&nbsp;&nbsp;&nbsp; def 
__iter__(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; terms = map(lambda 
p: UserTerm(p), 
self.auth.getPrincipals(''))<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return iter(terms)<BR>&nbsp;&nbsp;&nbsp; def 
__len__(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
len(self.auth.getPrincipals(''))<BR>&nbsp;&nbsp;&nbsp; def 
getQuery(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
None<BR>&nbsp;&nbsp;&nbsp; def getTerm(self, 
value):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
UserTerm(self.auth.getPrincipal(value))<BR>&nbsp;&nbsp;&nbsp; def 
getTermByToken(self, token):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return self.getTerm(token)<BR><BR><BR>I'm not interested in having principals 
that are not in an userfolder in <BR>the bugtracker, so I converted it 
to:<BR><BR>class UserTerm(Persistent):<BR><BR>&nbsp;&nbsp;&nbsp; 
implements(ITitledTokenizedTerm)<BR><BR>&nbsp;&nbsp;&nbsp; def __init__(self, 
principal):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This is safe here, 
since we only read non-critical 
data<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; naked = 
removeSecurityProxy(principal)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.principal = {'id': 
naked.id,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'login': 
naked.id,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'title': 
naked.title,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'description': naked.description}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
self.value = naked.id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.token = 
naked.id<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.title = 
naked.title<BR><BR><BR>class UserVocabulary(object):<BR>&nbsp;&nbsp;&nbsp; 
implements(IVocabulary, IVocabularyTokenized)<BR>&nbsp;&nbsp;&nbsp; def 
__init__(self, context):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.auth 
= zapi.principals()<BR>&nbsp;&nbsp;&nbsp; def __contains__(self, 
value):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # let's get the keys in 
the userfolders<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ids = [principal 
for queriable in self.auth.getQueriables() for <BR>principal in 
queriable[1]]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return value in 
ids<BR>&nbsp;&nbsp;&nbsp; def 
__iter__(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; terms = [ 
UserTerm(self.auth.getPrincipal(principal)) for <BR>queriable in 
self.auth.getQueriables() for principal in 
queriable[1]]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
iter(terms)<BR>&nbsp;&nbsp;&nbsp; def 
__len__(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
len([principal for queriable in self.auth.getQueriables() <BR>for principal in 
queriable[1]])<BR>&nbsp;&nbsp;&nbsp; def 
getQuery(self):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
None<BR>&nbsp;&nbsp;&nbsp; def getTerm(self, 
value):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 
UserTerm(self.auth.getPrincipal(value))<BR>&nbsp;&nbsp;&nbsp; def 
getTermByToken(self, token):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
return self.getTerm(token)<BR><BR>It's a big hack, BUT at least works, and turns 
the bugtracker online <BR>again! Suggestions for a better 
fix?</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards</FONT></DIV></BODY></HTML>