Edgewall Software

Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#11152 closed enhancement (fixed)

The "View Tickets" mainnav entry should be a link to the query page when the user possesses TICKET_VIEW but not REPORT_VIEW — at Version 6

Reported by: Ryan J Ollos <ryan.j.ollos@…> Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.2
Component: query system Version: 1.0-stable
Severity: normal Keywords: permissions report query navigation
Cc: Branch:
Release Notes:

The View Tickets mainnav item links to the /query page when the user has TICKET_VIEW and either the ReportModule is disabled or the user doesn't have REPORT_VIEW.

API Changes:
Internal Changes:

Description (last modified by Christian Boos)

The View Tickets mainnav entry links to the /report page, both of which are only displayed if the user has the REPORT_VIEW permission. TICKET_VIEW is the only permission required to view the /query page, however if the user doesn't have REPORT_VIEW, there is no direct way to navigate to the /query page.

I think it would make sense to have the View Tickets mainnav entry link to the /query page when the user has TICKET_VIEW, but does not have REPORT_VIEW.

Change History (6)

comment:1 by Christian Boos, 11 years ago

Milestone: next-stable-1.0.x

Right, that's already what happens when the report module is disabled.

comment:2 by Christian Boos, 11 years ago

Description: modified (diff)

comment:3 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

293d59cf implements the behavior discussed in comment:description, followed by a minor refactoring 8531b6a8.

It looks to me that Component.config is an in-memory object that is not recreated as the result of a Configuration.set or even a Configuration.save method call. Therefore, I can't see a reason to call Configuration.save within a test in which we only want the configuration to persist within the scope of the test case. If that makes sense, it would suggest that in the following we could drop the "save".

env = self._testenv.get_trac_environment()
env.config.set(...)
env.config.save()
try:
    ...
finally:
    env.config.remove(...)

It also seems unnecessary to call self._testenv.restart() after a configuration change.

I'll wait for feedback on those two issues before making the changes.

in reply to:  3 comment:4 by Ryan J Ollos <ryan.j.ollos@…>, 11 years ago

Replying to Ryan J Ollos <ryan.j.ollos@…>:

It looks to me that Component.config is an in-memory object that is not recreated as the result of a Configuration.set or even a Configuration.save method call.

I think I was wrong about this, since additional testing has shown that the save calls can't be removed. I'll have to look at it in more detail later to understand it better.

comment:5 by Ryan J Ollos, 11 years ago

Milestone: next-stable-1.0.x1.0.2
Owner: set to Ryan J Ollos
Status: newassigned

comment:6 by Ryan J Ollos, 11 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in [11824].

Note: See TracTickets for help on using tickets.