[wiki/categorie_public] Strip final / then infering page name from url
This commit is contained in:
parent
614452a323
commit
e4541a6340
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@ class PublicCategories(AnonymousAuth):
|
||||||
sys.stderr.write("Getting page from cache")
|
sys.stderr.write("Getting page from cache")
|
||||||
page = request.page
|
page = request.page
|
||||||
else:
|
else:
|
||||||
page = Page(request, unicode(urllib.unquote(p.path[1:]),'utf-8'))
|
pagename=unicode(urllib.unquote(p.path[1:]),'utf-8')
|
||||||
|
if pagename.endswith(u'/'):
|
||||||
|
pagename=pagename[:-1]
|
||||||
|
page = Page(request, pagename)
|
||||||
acl = page.getACL(request)
|
acl = page.getACL(request)
|
||||||
if acl.acl and [a[0] for a in acl.acl if a[0] == 'All' and a[1].get('read',False)]:
|
if acl.acl and [a[0] for a in acl.acl if a[0] == 'All' and a[1].get('read',False)]:
|
||||||
sys.stderr.write("acl All:read\n")
|
sys.stderr.write("acl All:read\n")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue