Patch #23546

Issue visibility "watched by, created by or assigned to" for roles

Added by Felix Schäfer over 2 years ago. Updated 8 months ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues permissions
Target version:-

Description

There's been a bit of discussion (parts of #8488 and other) and some patches already for this or similar (#14318#note-22) and others.

We wanted to contribute our "minimal" solution for this. This is a new ticket to avoid discussing ever more diverging patches on for example #8488.

23546-watched_or_created_or_assigned_issue_visibility.patch Magnifier (4.39 KB) Felix Schäfer, 2016-08-09 09:26

23546-watched_or_created_or_assigned_issue_visibility_3.4.1.patch Magnifier (5.32 KB) Marius BALTEANU, 2017-07-10 20:04


Related issues

Related to Redmine - Feature #8488: Create an 'Involve' mechanism to private issues New
Related to Redmine - Patch #14318: Watchers Alerted To Changes But Cannot See Issues (potent... Closed
Duplicated by Redmine - Feature #27028: Issue's visibility for the watchers Closed
Duplicated by Redmine - Feature #28223: Lack of access for Watchers if visibility=Issues created ... Closed
Duplicated by Redmine - Feature #28614: Issue Watcher view Issue when not in project group Closed

History

#2 Updated by Jan from Planio www.plan.io over 2 years ago

  • Related to Feature #8488: Create an 'Involve' mechanism to private issues added

#3 Updated by Jan from Planio www.plan.io over 2 years ago

  • Related to Patch #14318: Watchers Alerted To Changes But Cannot See Issues (potentially) added

#4 Updated by Marius BALTEANU over 2 years ago

I tested the patch and seems to work fine only for public projects. If I set the project as private, I can't see the issue anymore as watcher. This is the expected behavior?

#5 Updated by Holger Just over 2 years ago

The patch should work for private projects too. However, in this case, you need to be a member of the project with a role which gives you:

  • the permission to view issues,
  • and the appropriate issue visibility

#6 Updated by Jens Krämer over 2 years ago

Or, in other words - this new issue visibility option (like any of the other issue visiblity options) is not expected to give access to issues in projects where you don't have access to issues through your role's permissions. The goal is just to provide a slightly broader scope compared to the 'issues created by or assigned to the user' option.

#7 Updated by Marius BALTEANU over 2 years ago

Jens Krämer wrote:

Or, in other words - this new issue visibility option (like any of the other issue visiblity options) is not expected to give access to issues in projects where you don't have access to issues through your role's permissions. The goal is just to provide a slightly broader scope compared to the 'issues created by or assigned to the user' option.

Thanks, now is clear for me how should work.

#8 Updated by Toshi MARUYAMA over 2 years ago

  • Target version set to 3.4.0

#9 Updated by David Sleeman about 2 years ago

I tested this with MySQL12 and Redmine 3.3.0 and I received a parsing error for users with watched permission for some projects and all issue for other projects. The apache logs claimed a parsing error SQL and the front end showed error 500 when trying to view all issues for all projects. Any suggestions on how to proceed? I'm very keen to see this implemented but my SQL knowledge is quite low.

#10 Updated by Jean-Philippe Lang almost 2 years ago

  • Target version deleted (3.4.0)

#11 Updated by Bruno Medeiros almost 2 years ago

You may be interested in my last comment on #8488 about this patch.

#12 Updated by Marius BALTEANU over 1 year ago

@Felix, I've started to update the patches used in our instance to apply cleanly to Redmine 3.4.1 and a test from this patch fails (ActiveRecord::RecordInvalid: Validation failed: Assignee is invalid).

I've updated your patch to pass the tests, please take a look on my changes to confirm that are ok (of course, if you want and have the time :) ).

#13 Updated by Go MAEDA about 1 year ago

  • Duplicated by Feature #27028: Issue's visibility for the watchers added

#14 Updated by Mischa The Evil 10 months ago

  • Duplicated by Feature #28223: Lack of access for Watchers if visibility=Issues created by or assigned to added

#15 Updated by Lara R 8 months ago

I am unable to install it.
I tried with these command:
patch -p0 < 23546-watched_or_created_or_assigned_issue_visibility_3.4.1.patch.

I got this error:

can't find file to patch at input line 4_ Perhaps you used the wrong -p or --strip option? The text leading up to this was:

|*** diff Naur app/models/issue.rb ---- File to patch: –

Any ideas?

#16 Updated by Go MAEDA 8 months ago

  • Duplicated by Feature #28614: Issue Watcher view Issue when not in project group added

#17 Updated by Marius BALTEANU 25 days ago

  • Duplicated by Defect #29911: [Email Notification] _involved in_ clarification added

#18 Updated by Marius BALTEANU 25 days ago

  • Duplicated by deleted (Defect #29911: [Email Notification] _involved in_ clarification)

Also available in: Atom PDF