Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6766 closed defect (fixed)

TitleIndex macro is not using Permissions

Reported by: digiqr+trac@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: wiki system Version: 0.11b1
Severity: minor Keywords: permission
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm using TracFineGrainedPermissions, but [[TitleIndex]] macro is still showing all Wiki pages for everyone. There could be option to hide that pages.

Attachments (0)

Change History (4)

comment:1 by digiqr+trac@…, 17 years ago

I don't know if this is correct and fast solution but it is working for me…

  • trac/wiki/macros.py

     
    102102            return tag.ul([tag.li(tag.a(wiki.format_page_name(page),
    103103                                        href=formatter.href.wiki(page)))
    104104                           for page in pages
    105                            if depth < 0 or depth >= page.count('/') - start])
     105                           if (depth < 0 or depth >= page.count('/') - start) and
     106                               'WIKI_VIEW' in formatter.perm('wiki', page)])
    106107       
    107108        # Group by Wiki word and/or Wiki hierarchy
    108109        pages = [(self.SPLIT_RE.split(wiki.format_page_name(page, split=True)),

comment:2 by Christian Boos, 17 years ago

Keywords: permission added
Milestone: 0.11

Yes, it's that simple ;-)

comment:3 by osimons, 17 years ago

Resolution: fixed
Status: newclosed

Fixed in [6472].

Moved the permission check further up to catch all use cases by dropping unauthorized pages when building the initial pagelist.

Tested, and worked fine - until I switched to date view and noticed that the RecentChanges macro had no interest in such permissions either. Now they both do.

Thanks for spotting and proposing a fix!

comment:4 by digiqr+trac@…, 17 years ago

Thanks for fix. I missed RecentChanges because we don't use it :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.