If user is MO and an officer of the TO, do not render resend invite link
This commit is contained in:
		| @@ -231,6 +231,7 @@ def task_order_invitations(portfolio_id, task_order_id): | |||||||
|             portfolio=portfolio, |             portfolio=portfolio, | ||||||
|             task_order=task_order, |             task_order=task_order, | ||||||
|             form=form, |             form=form, | ||||||
|  |             user=g.current_user, | ||||||
|         ) |         ) | ||||||
|     else: |     else: | ||||||
|         raise NotFoundError("task_order") |         raise NotFoundError("task_order") | ||||||
|   | |||||||
| @@ -99,21 +99,23 @@ | |||||||
|           {{ Link("Update", "edit", onClick="edit") }} |           {{ Link("Update", "edit", onClick="edit") }} | ||||||
|           {% set invite_type = [prefix + "_invite"] %} |           {% set invite_type = [prefix + "_invite"] %} | ||||||
|  |  | ||||||
|           {{ |           {% if not (user == task_order.creator and user == task_order[officer_type]) %} | ||||||
|             ConfirmationButton( |             {{ | ||||||
|               btn_text="Resend Invitation", |               ConfirmationButton( | ||||||
|               confirm_btn=('task_orders.invitations.resend_btn' | translate), |                 btn_text="Resend Invitation", | ||||||
|               confirm_msg=('task_orders.invitations.resend_confirmation_message' | translate), |                 confirm_btn=('task_orders.invitations.resend_btn' | translate), | ||||||
|               action=url_for( |                 confirm_msg=('task_orders.invitations.resend_confirmation_message' | translate), | ||||||
|                 "portfolios.resend_invite", |                 action=url_for( | ||||||
|                 portfolio_id=portfolio.id, |                   "portfolios.resend_invite", | ||||||
|                 task_order_id=task_order.id, |                   portfolio_id=portfolio.id, | ||||||
|                 invite_type=invite_type, |                   task_order_id=task_order.id, | ||||||
|               ), |                   invite_type=invite_type, | ||||||
|               btn_icon=Icon('avatar'), |                 ), | ||||||
|               btn_class="icon-link", |                 btn_icon=Icon('avatar'), | ||||||
|             ) |                 btn_class="icon-link", | ||||||
|           }} |               ) | ||||||
|  |             }} | ||||||
|  |           {% endif %} | ||||||
|  |  | ||||||
|           {{ Link("Remove", "trash", classes="remove") }} |           {{ Link("Remove", "trash", classes="remove") }} | ||||||
|         </div> |         </div> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user