Conversation
e53e5ec to
61c9c2a
Compare
toy
left a comment
There was a problem hiding this comment.
More or less only nitpicks, even the base error not shown is sort of hard to trigger
| def user_authorized | ||
| return if model.project.nil? | ||
|
|
||
| unless user.allowed_in_project?(:create_sprints, model.project) |
There was a problem hiding this comment.
Would be better for the permission to be named edit_sprints, but it was not added in this PR
There was a problem hiding this comment.
I think manage_sprints would be even better. But as you said, out of scope.
| unless user.allowed_in_project?(:create_sprints, model.project) | ||
| errors.add :base, :error_unauthorized | ||
| if model.project.receive_shared_sprints? | ||
| errors.add :project, :receiving_sprints |
There was a problem hiding this comment.
Base errors are not displayed in the dialog, so if I open dialog, then switch the project to receiving shared sprints and then submit the dialog, it re-renders without any explanation of the problem
There was a problem hiding this comment.
True, but for now, it probably isn't a real problem, given that the button to create a sprint doesn't exist if the user lacks the permission.
The modal should still display the base errors but that is out of scope I feel.
modules/backlogs/spec/contracts/sprints/shared_contract_examples.rb
Outdated
Show resolved
Hide resolved
modules/backlogs/spec/contracts/sprints/shared_contract_examples.rb
Outdated
Show resolved
Hide resolved
|
Sorry, used wrong git command |
…sed-on-project-s-sharing-settings
…imit-sprint-creation-based-on-project-s-sharing-settings
Ticket
https://community.openproject.org/wp/72816
What are you trying to accomplish?
If the project is configured to receive sprints, creating own sprints should no longer be possible. Updating sprints that might still stick around (e.g. because a work package is associated to them) should still be possible, though.
To that end:
Merge checklist