Branch: refs/heads/master
Home: https://github.com/openSUSE/open-build-service
Commit: bdf2dec018841af43fe3de8a491c05e88019ef36
https://github.com/openSUSE/open-build-service/commit/bdf2dec018841af43fe3de...
Author: Lukas Krause
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M src/api/app/models/user.rb
M src/api/app/policies/decision_policy.rb
Log Message:
-----------
Only check if user has moderator role in `is_moderator?` method
In the beginning of the content_moderation feature we considered
user that have the admin or stuff roles to be moderator. But now
we have the dedicated moderator role. So we only should check
for that in the `is_moderator?` method and leave the rest to
the pundit policies.
Commit: 9a58e678e4d37cf0e62c374ddf5a2724764a88be
https://github.com/openSUSE/open-build-service/commit/9a58e678e4d37cf0e62c37...
Author: Lukas Krause
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M src/api/app/controllers/webui/users/notifications_controller.rb
M src/api/app/jobs/send_event_emails_job.rb
M src/api/app/models/event_subscription/form.rb
M src/api/app/policies/report_policy.rb
M src/api/app/services/notification_service/notifier.rb
Log Message:
-----------
Create `notify?` report policy
Right now the authorization logic is spread over several places.
Lets move it to a policy to avoid duplications and confusion.
The policy is meant to decide if a user should be notified about
a created report or not.
Commit: e245a717a01c83485f644d4f5bf0432ce5ef0d37
https://github.com/openSUSE/open-build-service/commit/e245a717a01c83485f644d...
Author: Lukas Krause
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M src/api/app/policies/comment_policy.rb
M src/api/spec/factories/users.rb
M src/api/spec/policies/comment_policy_spec.rb
Log Message:
-----------
Consider user with moderator role in comment `moderate?` policy
Commit: 02b968df5a8937f5f34b98182e22c243e8d39665
https://github.com/openSUSE/open-build-service/commit/02b968df5a8937f5f34b98...
Author: Lukas Krause
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M src/api/spec/policies/report_policy_spec.rb
Log Message:
-----------
Create spec for report `notify?` policy
Commit: 86327d2135db16a62732b944a73a8b33e3c61a07
https://github.com/openSUSE/open-build-service/commit/86327d2135db16a62732b9...
Author: Jacob Michalskie
Date: 2023-10-02 (Mon, 02 Oct 2023)
Changed paths:
M src/api/app/policies/comment_policy.rb
Log Message:
-----------
Avoid self moderating/unmoderating comments
Commit: ffe5a31cdbdd4ef171e852de18177350e4103d75
https://github.com/openSUSE/open-build-service/commit/ffe5a31cdbdd4ef171e852...
Author: Lukas Krause
Date: 2023-10-04 (Wed, 04 Oct 2023)
Changed paths:
M src/api/app/controllers/webui/users/notifications_controller.rb
M src/api/app/jobs/send_event_emails_job.rb
M src/api/app/models/event_subscription/form.rb
M src/api/app/models/user.rb
M src/api/app/policies/comment_policy.rb
M src/api/app/policies/decision_policy.rb
M src/api/app/policies/report_policy.rb
M src/api/app/services/notification_service/notifier.rb
M src/api/spec/factories/users.rb
M src/api/spec/policies/comment_policy_spec.rb
M src/api/spec/policies/report_policy_spec.rb
Log Message:
-----------
Merge pull request #14964 from krauselukas/align_is_moderator_method
Align `is_moderator?` method and report pundit policies
Compare: https://github.com/openSUSE/open-build-service/compare/91bf8164b20a...ffe5a3...