Please sign in to comment.
Add new permission to allow force publishing anything
In the edition rules, if the action is force_publish and the actor can_force_publish_anything? return true immediately. This is so that the robot account used during force publish process for an import is able to force publish stuff. I didn't want to add a full on "can do anything" permission, hence the limited scope of this.
- Loading branch information...
Showing with 131 additions and 8 deletions.
- +5 −0 app/models/user.rb
- +3 −1 lib/whitehall/authority/rules/edition_rules.rb
- +10 −0 test/unit/user_test.rb
- +14 −2 test/unit/whitehall/authority/department_editor_test.rb
- +22 −2 test/unit/whitehall/authority/department_writer_test.rb
- +14 −2 test/unit/whitehall/authority/gds_editor_test.rb
- +32 −1 test/unit/whitehall/authority/world_editor_test.rb
- +31 −0 test/unit/whitehall/authority/world_writer_test.rb