Content
View differences
Updated by Till Breuer over 12 years ago
When I visit work\_packages\#show in a private project
as a user who is permitted to add watchers
and I click ‘add watchers’
acts\_as\_watchable\#possible\_watcher\_users is triggered.
This method selects all non-anonymous users (User.built\_in) and rejects those who don’t have the permission to ‘view\_work\_packages’.
In a private project the default allowance evaluator has to find a role on a project membership to permit ‘view\_work\_packages’ to a user. If this is consistent throughout all plugins it is possible to avoid filtering through all users database-wide and one could instead start with User.member\_of(project).
as a user who is permitted to add watchers
and I click ‘add watchers’
acts\_as\_watchable\#possible\_watcher\_users is triggered.
This method selects all non-anonymous users (User.built\_in) and rejects those who don’t have the permission to ‘view\_work\_packages’.
In a private project the default allowance evaluator has to find a role on a project membership to permit ‘view\_work\_packages’ to a user. If this is consistent throughout all plugins it is possible to avoid filtering through all users database-wide and one could instead start with User.member\_of(project).