Links to tickets without ShowTicket right displays owner

Hi,

if you have ticket 1 which is linked to ticket 2 and the user doesn’t
have rights for ticket 2 the link is:
1: [] (owner ticket 2)
The ticket 2 subject and status isn’t displayed because the rights check
but the ticket 2 owner is displayed without any rights check.

Also, if ticket 2 status is closed the class of the span element of the
link isn’t set to ‘ticket-inactive’ because the ticket 2 status value
isn’t accessible for the user.

As a fix I would suggest adding an CurrentUserHasRight(‘ShowTicket’)
check here:

With this, the link would fall back to $URI->AsString which shows only
the ticket id (the subject isn’t shown in this case).

If this fix would be accepted, I have already an pull request open on
this file and maybe I can add an commit with this change to the PR:

or should I create a new PR?

Chris

If this fix would be accepted, I have already an pull request open on
this file and maybe I can add an commit with this change to the PR:
add the ticket status to the link class by netsandbox · Pull Request #85 · bestpractical/rt · GitHub
or should I create a new PR?

From your description, your fix sounds correct (I’ve not read all the
relevant code to confirm, but I trust that you’re giving a fair
summary).

Please open a separate PR about it since it’s not really related to
85.

-kevin

Am 05.02.2014 18:00, schrieb rt-devel-request@lists.bestpractical.com:

From your description, your fix sounds correct (I’ve not read all the
relevant code to confirm, but I trust that you’re giving a fair
summary).

Please open a separate PR about it since it’s not really related to
85.

Should this PR should go against maint which will then be merged in
stable or should I create for each branch separate PR’s?

If something is broken in 4.0 (maint) it should go against that and
we’ll merge it up. Sometimes we may rebase something and say it’s
only going into stable if we think it’s not 4.0-relevant.

There are exceptions to this, such as my two recent branches,
4.0/simplesearch-placeholder-text and 4.2/simplesearch-placeholder-text
where the code path is so different between 4.0 and 4.2 that I wrote
two branches.

If something will merge with no or minor tweaking from maint to
stable, then target your branch to maint.

-kevin