comparison MoinMoin/macro/__init__.py @ 2786:a16ba90d1f7e

macro.__init__.py:GetVal bug fixed of respecting acls and test added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 29 Aug 2007 19:46:01 +0200
parents cdda42a9d8a8
children 8608b258f8e6
comparison
equal deleted inserted replaced
2785:ff1886a5defa 2786:a16ba90d1f7e
390 390
391 return result 391 return result
392 392
393 def macro_GetVal(self, page=None, key=None): 393 def macro_GetVal(self, page=None, key=None):
394 page = wikiutil.get_unicode(self.request, page, 'page') 394 page = wikiutil.get_unicode(self.request, page, 'page')
395 if not self.request.user.may.read(page):
396 raise ValueError("You don't have enough rights on this page")
395 key = wikiutil.get_unicode(self.request, key, 'key') 397 key = wikiutil.get_unicode(self.request, key, 'key')
396 if page is None or key is None: 398 if page is None or key is None:
397 raise ValueError("You need to give: pagename, key") 399 raise ValueError("You need to give: pagename, key")
398 d = self.request.dicts.dict(page) 400 d = self.request.dicts.dict(page)
399 result = d.get(key, '') 401 result = d.get(key, '')