Don't generate new customer view token every time

This commit is contained in:
2022-03-07 07:52:17 -05:00
parent 7b5b673ebf
commit 30b704c90f
4 changed files with 25 additions and 5 deletions

View File

@@ -62,7 +62,7 @@ class IssuesShowHookListener < Redmine::Hook::ViewListener
def view_issues_show_description_bottom(context={})
bill_button = button_to "Bill Time", "#{Redmine::Utils::relative_url_root}/qbo/bill/#{context[:issue].id}", method: :get if User.current.admin?
share_button = button_to "Share", "#{Redmine::Utils::relative_url_root}/customers/view/#{context[:issue].share_token.token}", method: :get if User.current.logged?
share_button = button_to "Share", "#{Redmine::Utils::relative_url_root}/customers/share/#{context[:issue].id}", method: :get if User.current.logged?
return "<br/> #{bill_button} #{share_button}"
end