Merge branch 'master' into revert-user-deletion
This commit is contained in:
@@ -142,3 +142,9 @@ class PortfolioInvitations(BaseInvitations):
|
||||
class ApplicationInvitations(BaseInvitations):
|
||||
model = ApplicationInvitation
|
||||
role_domain_class = ApplicationRoles
|
||||
|
||||
@classmethod
|
||||
def revoke(cls, token):
|
||||
invite = super().revoke(token)
|
||||
ApplicationRoles.disable(invite.role)
|
||||
return invite
|
||||
|
@@ -183,11 +183,7 @@ def handle_create_member(application_id, form_data):
|
||||
token=invite.token,
|
||||
)
|
||||
|
||||
flash(
|
||||
"new_application_member",
|
||||
user_name=invite.user_name,
|
||||
application_name=application.name,
|
||||
)
|
||||
flash("new_application_member", user_name=invite.first_name)
|
||||
|
||||
except AlreadyExistsError:
|
||||
return render_template(
|
||||
|
@@ -8,9 +8,9 @@ MESSAGES = {
|
||||
"category": "success",
|
||||
},
|
||||
"application_created": {
|
||||
"title_template": translate("flash.success"),
|
||||
"title_template": translate("flash.application.created.title"),
|
||||
"message_template": """
|
||||
{{ "flash.application.created" | translate({"application_name": application_name}) }}
|
||||
{{ "flash.application.created.message" | translate({"application_name": application_name}) }}
|
||||
""",
|
||||
"category": "success",
|
||||
},
|
||||
@@ -40,7 +40,7 @@ MESSAGES = {
|
||||
"category": "error",
|
||||
},
|
||||
"application_invite_resent": {
|
||||
"title_template": "Application invitation revoked",
|
||||
"title_template": "Application invitation resent",
|
||||
"message_template": "You have successfully resent the invite for {{ user_name }} from {{ application_name }}",
|
||||
"category": "success",
|
||||
},
|
||||
@@ -104,9 +104,9 @@ MESSAGES = {
|
||||
"category": "warning",
|
||||
},
|
||||
"new_application_member": {
|
||||
"title_template": translate("flash.success"),
|
||||
"title_template": """{{ "flash.new_application_member.title" | translate({ "user_name": user_name }) }}""",
|
||||
"message_template": """
|
||||
<p>{{ "flash.new_application_member" | translate({ "user_name": user_name, "application_name": application_name }) }}</p>
|
||||
<p>{{ "flash.new_application_member.message" | translate({ "user_name": user_name }) }}</p>
|
||||
""",
|
||||
"category": "success",
|
||||
},
|
||||
|
Reference in New Issue
Block a user