- def check_permission
- unless current_user.administrator? || current_user.moderator?
- flash[:error] = t("application.require_admin.not_an_admin")
- redirect_to root_path
- end
+ # This sort of assumes there are only two roles
+ def reassign_issue(issue)
+ role = (Issue::ASSIGNED_ROLES - [issue.assigned_role]).first
+ issue.assigned_role = role
+ issue.save!