Index: roundup/backends/back_anydbm.py =================================================================== RCS file: /cvsroot/roundup/roundup/roundup/backends/back_anydbm.py,v retrieving revision 1.202 diff -u -8 -r1.202 back_anydbm.py --- roundup/backends/back_anydbm.py 29 Aug 2006 04:20:50 -0000 1.202 +++ roundup/backends/back_anydbm.py 13 Sep 2006 10:03:43 -0000 @@ -1373,16 +1373,21 @@ If this class has no key property, a TypeError is raised. If the 'keyvalue' matches one of the values for the key property among the nodes in this class, the matching node's id is returned; otherwise a KeyError is raised. ''' if not self.key: raise TypeError, 'No key property set for class %s'%self.classname + + # special notation for looking up the current database user + if keyvalue == '.' and self.classname == 'user': + keyvalue = str(self.db.getuid()) + cldb = self.db.getclassdb(self.classname) try: for nodeid in self.getnodeids(cldb): node = self.db.getnode(self.classname, nodeid, cldb) if node.has_key(self.db.RETIRED_FLAG): continue if not node.has_key(self.key): continue Index: roundup/backends/back_metakit.py =================================================================== RCS file: /cvsroot/roundup/roundup/roundup/backends/back_metakit.py,v retrieving revision 1.113 diff -u -8 -r1.113 back_metakit.py --- roundup/backends/back_metakit.py 29 Aug 2006 04:20:50 -0000 1.113 +++ roundup/backends/back_metakit.py 13 Sep 2006 10:03:45 -0000 @@ -979,16 +979,20 @@ If this class has no key property, a TypeError is raised. If the keyvalue matches one of the values for the key property among the nodes in this class, the matching node's id is returned; otherwise a KeyError is raised. ''' if not self.key: raise TypeError, 'No key property set for class %s'%self.classname + # special notation for looking up the current database user + if keyvalue == '.' and self.classname == 'user': + keyvalue = str(self.db.getuid()) + if type(keyvalue) is not _STRINGTYPE: raise TypeError, '%r is not a string'%keyvalue # XXX FIX ME -> this is a bit convoluted # First we search the index view to get the id # which is a quicker look up. # Then we lookup the row with id=id # if the _isdel property of the row is 0, return the Index: roundup/backends/rdbms_common.py =================================================================== RCS file: /cvsroot/roundup/roundup/roundup/backends/rdbms_common.py,v retrieving revision 1.181 diff -u -8 -r1.181 rdbms_common.py --- roundup/backends/rdbms_common.py 30 Aug 2006 09:28:26 -0000 1.181 +++ roundup/backends/rdbms_common.py 13 Sep 2006 10:03:48 -0000 @@ -1863,16 +1863,20 @@ If this class has no key property, a TypeError is raised. If the 'keyvalue' matches one of the values for the key property among the nodes in this class, the matching node's id is returned; otherwise a KeyError is raised. ''' if not self.key: raise TypeError, 'No key property set for class %s'%self.classname + + # special notation for looking up the current database user + if keyvalue == '.' and self.classname == 'user': + keyvalue = str(self.db.getuid()) # use the arg to handle any odd database type conversion (hello, # sqlite) sql = "select id from _%s where _%s=%s and __retired__ <> %s"%( self.classname, self.key, self.db.arg, self.db.arg) self.db.sql(sql, (keyvalue, 1)) # see if there was a result that's not retired @@ -2167,29 +2199,33 @@ frum.append('_%s as _%s' % (cn, ln)) where.append('_%s._%s=_%s.id'%(pln, k, ln)) if p.has_values: if isinstance(v, type([])): d = {} for entry in v: if entry == '-1': entry = None + elif entry == '.' and propclass.classname == 'user': + entry = self.db.getuid() d[entry] = entry l = [] if d.has_key(None) or not d: del d[None] l.append('_%s._%s is NULL'%(pln, k)) if d: v = d.keys() s = ','.join([a for x in v]) l.append('(_%s._%s in (%s))'%(pln, k, s)) args = args + v if l: where.append('(' + ' or '.join(l) +')') else: + if v == '.' and propclass.classname == 'user': + v = self.db.getuid() if v in ('-1', None): v = None where.append('_%s._%s is NULL'%(pln, k)) else: where.append('_%s._%s=%s'%(pln, k, a)) args.append(v) if p.sort_type > 0: lp = p.cls.labelprop() Index: roundup/cgi/templating.py =================================================================== RCS file: /cvsroot/roundup/roundup/roundup/cgi/templating.py,v retrieving revision 1.254 diff -u -8 -r1.254 templating.py --- roundup/cgi/templating.py 9 Sep 2006 05:50:17 -0000 1.254 +++ roundup/cgi/templating.py 13 Sep 2006 10:03:50 -0000 @@ -371,16 +371,19 @@ for entry in ids: try: l.append(cl.lookup(entry)) except (TypeError, KeyError): # if fail_ok, ignore lookup error # otherwise entry must be existing object id rather than key value if fail_ok or num_re.match(entry): l.append(entry) + # as a special case, '.' means the currently logged-in user + elif entry == '.' and prop.classname == 'user': + l.append(entry) return l def lookupKeys(linkcl, key, ids, num_re=re.compile('^-?\d+$')): ''' Look up the "key" values for "ids" list - though some may already be key values, not ids. ''' l = [] for entry in ids: Index: templates/classic/html/issue.search.html =================================================================== RCS file: /cvsroot/roundup/roundup/templates/classic/html/issue.search.html,v retrieving revision 1.20 diff -u -8 -r1.20 issue.search.html --- templates/classic/html/issue.search.html 9 Aug 2006 05:42:51 -0000 1.20 +++ templates/classic/html/issue.search.html 13 Sep 2006 10:03:51 -0000 @@ -72,18 +72,18 @@