Mercurial > p > roundup > code
comparison roundup/cgi/templating.py @ 3594:b5b6a6f7743a
fix bug in menu() permission filter [SF#1444440]
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Thu, 09 Mar 2006 05:56:12 +0000 |
| parents | 35b35a152b40 |
| children | 1dbaa664be28 |
comparison
equal
deleted
inserted
replaced
| 3593:3d9e1906ba58 | 3594:b5b6a6f7743a |
|---|---|
| 1760 sort_on = ('+', find_sort_key(linkcl)) | 1760 sort_on = ('+', find_sort_key(linkcl)) |
| 1761 | 1761 |
| 1762 options = [opt | 1762 options = [opt |
| 1763 for opt in linkcl.filter(None, conditions, sort_on, (None, None)) | 1763 for opt in linkcl.filter(None, conditions, sort_on, (None, None)) |
| 1764 if self._db.security.hasPermission("View", self._client.userid, | 1764 if self._db.security.hasPermission("View", self._client.userid, |
| 1765 linkcl.classname, itemid=id)] | 1765 linkcl.classname, itemid=opt)] |
| 1766 | 1766 |
| 1767 # make sure we list the current value if it's retired | 1767 # make sure we list the current value if it's retired |
| 1768 if value and value not in options: | 1768 if value and value not in options: |
| 1769 options.insert(0, value) | 1769 options.insert(0, value) |
| 1770 | 1770 |
| 1946 sort_on = ('+', find_sort_key(linkcl)) | 1946 sort_on = ('+', find_sort_key(linkcl)) |
| 1947 | 1947 |
| 1948 options = [opt | 1948 options = [opt |
| 1949 for opt in linkcl.filter(None, conditions, sort_on) | 1949 for opt in linkcl.filter(None, conditions, sort_on) |
| 1950 if self._db.security.hasPermission("View", self._client.userid, | 1950 if self._db.security.hasPermission("View", self._client.userid, |
| 1951 linkcl.classname, itemid=id)] | 1951 linkcl.classname, itemid=opt)] |
| 1952 height = height or min(len(options), 7) | 1952 height = height or min(len(options), 7) |
| 1953 l = ['<select multiple name="%s" size="%s">'%(self._formname, height)] | 1953 l = ['<select multiple name="%s" size="%s">'%(self._formname, height)] |
| 1954 k = linkcl.labelprop(1) | 1954 k = linkcl.labelprop(1) |
| 1955 | 1955 |
| 1956 # make sure we list the current values if they're retired | 1956 # make sure we list the current values if they're retired |
