Edgewall Software
Modify

Opened 8 years ago

Closed 8 years ago

#12666 closed defect (fixed)

/milestone only redirects to /roadmap if user has MILESTONE_VIEW

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.2
Component: roadmap Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

The path /milestone redirects to /roadmap even when a user doesn't have MILESTONE_VIEW.

API Changes:
Internal Changes:

Description

If user has MILESTONE_VIEW /milestone redirects to /roadmap. A PermissionError is displayed if user doesn't have MILESTONE_VIEW.

We could make the behavior consistent by always redirecting to /roadmap with a patch such as:

  • trac/ticket/roadmap.py

    diff --git a/trac/ticket/roadmap.py b/trac/ticket/roadmap.py
    index d1328a4c3..c5c8952d1 100644
    a b class MilestoneModule(Component):  
    736736
    737737    def process_request(self, req):
    738738        milestone_id = req.args.get('id')
     739        if not milestone_id:
     740            req.redirect(req.href.roadmap())
    739741        req.perm(self.realm, milestone_id).require('MILESTONE_VIEW')
    740742
    741743        add_link(req, 'up', req.href.roadmap(), _("Roadmap"))
    class MilestoneModule(Component):  
    767769        elif action == 'delete':
    768770            return self._render_confirm(req, milestone)
    769771
    770         if not milestone.name:
    771             req.redirect(req.href.roadmap())
    772 
    773772        return self._render_view(req, milestone)
    774773
    775774    # Public methods

Attachments (0)

Change History (2)

comment:1 by Ryan J Ollos, 8 years ago

Release Notes: modified (diff)

comment:2 by Ryan J Ollos, 8 years ago

Resolution: fixed
Status: assignedclosed

Committed to trunk in r15367.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos 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.