Skip to content

Commit

Permalink
Add verify permissions to example data and personas
Browse files Browse the repository at this point in the history
  • Loading branch information
richardpattinson committed Sep 29, 2023
1 parent ef9fbe2 commit 3bbb70f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/personas/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
row.with_cell(header: true, text: "Change work history")
row.with_cell(header: true, text: "Reverse decisions")
row.with_cell(header: true, text: "Support console")
row.with_cell(header: true, text: "Verify applicants")
row.with_cell(header: true, text: "Withdraw")
row.with_cell(header: true, text: "Actions", numeric: true)
end
Expand All @@ -44,6 +45,7 @@
row.with_cell { govuk_boolean_tag(staff.change_work_history_permission) }
row.with_cell { govuk_boolean_tag(staff.reverse_decision_permission) }
row.with_cell { govuk_boolean_tag(staff.support_console_permission) }
row.with_cell { govuk_boolean_tag(staff.verify_permission) }
row.with_cell { govuk_boolean_tag(staff.withdraw_permission) }

row.with_cell(numeric: true) do
Expand Down
15 changes: 15 additions & 0 deletions lib/tasks/example_data.rake
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def staff_members
change_work_history_permission: false,
reverse_decision_permission: false,
support_console_permission: false,
verify_permission: false,
withdraw_permission: false,
},
{
Expand All @@ -70,6 +71,7 @@ def staff_members
change_work_history_permission: false,
reverse_decision_permission: false,
support_console_permission: false,
verify_permission: false,
withdraw_permission: false,
},
{
Expand All @@ -80,6 +82,7 @@ def staff_members
change_work_history_permission: true,
reverse_decision_permission: true,
support_console_permission: true,
verify_permission: false,
withdraw_permission: true,
},
{
Expand All @@ -90,6 +93,18 @@ def staff_members
change_work_history_permission: false,
reverse_decision_permission: false,
support_console_permission: false,
verify_permission: false,
withdraw_permission: false,
},
{
name: "Victarion Verifier",
email: "[email protected]",
award_decline_permission: false,
change_name_permission: false,
change_work_history_permission: false,
reverse_decision_permission: false,
support_console_permission: false,
verify_permission: true,
withdraw_permission: false,
},
]
Expand Down
5 changes: 5 additions & 0 deletions spec/factories/staff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
# support_console_permission :boolean default(FALSE), not null
# unconfirmed_email :string
# unlock_token :string
# verify_permission :boolean default(FALSE), not null
# withdraw_permission :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
Expand Down Expand Up @@ -79,6 +80,10 @@
support_console_permission { true }
end

trait :with_verification_permission do
verify_permission { true }
end

trait :with_withdraw_permission do
withdraw_permission { true }
end
Expand Down

0 comments on commit 3bbb70f

Please sign in to comment.