Closed maxrossello closed 2 years ago
May I help you somehow? :-)
If you have development skills for debugging... :-) I need to get to some spare time to first align to RM 4.2.2 and then cover the case in automated tests and do some debugging
Hi, I don't know if it helps, but here is what I tracked in firefox, when I want add new watcher and plugin is in protected mode
WatchersController.users_for_new_watcher lists also groups as assignable watchers, but Groups do not respond to :allowed_to?
I am going to validate the following patch
diff --git a/plugins/redmine_extended_watchers/lib/extended_watchers_controller_patch.rb b/plugins/redmine_extended_watchers/lib/extended_watchers_controller_patch.rb index 36b1d110f..5eaf89841 100644 --- a/plugins/redmine_extended_watchers/lib/extended_watchers_controller_patch.rb +++ b/plugins/redmine_extended_watchers/lib/extended_watchers_controller_patch.rb @@ -36,7 +36,7 @@ module ExtendedWatchersControllerPatch end end if Setting.plugin_redmine_extended_watchers["policy"] == "protected" and @project.present? - users.reject! {|user| !user.allowed_to?(:view_issues, @project)} + users.reject! {|user| user.respond_to?(:allowed_to?) && !user.allowed_to?(:view_issues, @project)} end users end
Hi @maxrossello , I just test this patch and it dosn't work how I expected. Pop up windows with members to add doesn't show.
Hi @maxrossello , any news?
I haven't finalized the automated tests for a release because I've been rather busy, but the patch works for me. Please try cleaning stuff in the browser and make sure that the patch is applied. Do you still have a 500 error?
Huh... I made big mistake. Sorry @maxrossello .... The patch is OK. I made some tests on it and it looks OK. Thank you for quick support... :-)
Fix deployed in release 4.2.2 (branches: 4.2 and master). Thanks
In protected mode, when adding a group of users in the project memberships, the add watchers dialog for any issue is not popping up. Tested on 4.2.1 pre-release.