Admin cannot add new issues via UI on group's board to label-list
Summary
Regular group member (with role reporter+) can create new issue form the group board's page to the label-list:
At the same time, admin-user - can not:
I guess, admin user should be able to manage all kind of resources including that one. Looks like trouble is in calculation of BoardPolicy#create_non_backlog_issues ability - for group boards it relies on user's project_authorizations, which can be missed for admin user. Nevertheless, admin should have that access
Steps to reproduce
Authorize as non-admin user. Create a group XYZ. Visit Issues board page of group XYZ. Create new board-list with some label on it. Try to create new issue with '+' button on the right-top corner of board-list's pane (success). Authorize as admin user. Visit Issues board page of group XYZ. Try to create new issue with '+' button on the right-top corner of board-list's pane (failure - there's no button).
What is the current bug behavior?
No possibility to create new issue - there's no corresponding button in UI.
What is the expected correct behavior?
It shouldn't be restricted for admin:
Possible fixes
Easy fix can be just adding a new rule to board_policy:
rule { admin }.policy do
enable :create_non_backlog_issues
end
Maybe for now it's an overkill to add that rule to both groups and projects, but it seems to be reliable - it guarantees that admin will have that ability.