diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6f3fcd30b..35f0c2b42 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -8,6 +8,10 @@ Changes
-------
Unreleased
==========
+2019-11-25: v0.6.5
+^^^^^^^^^^^^^^^^^^
+* :pencil: Allow invitations for roles other than "user"
+
2019-11-21: v0.6.4
^^^^^^^^^^^^^^^^^^
* :sparkles: Informant-subject relationships
diff --git a/girderformindlogger/api/v1/applet.py b/girderformindlogger/api/v1/applet.py
index a8bd33c82..e4d52917c 100644
--- a/girderformindlogger/api/v1/applet.py
+++ b/girderformindlogger/api/v1/applet.py
@@ -384,7 +384,7 @@ def invite(self, applet, role="user", idCode=None, profile=None):
invitation = Invitation().createInvitation(
applet=applet,
coordinator=user,
- role="user",
+ role=role,
profile=profile,
idCode=idCode
)
diff --git a/girderformindlogger/models/invitation.py b/girderformindlogger/models/invitation.py
index c08bd99fd..cb75ca54b 100644
--- a/girderformindlogger/models/invitation.py
+++ b/girderformindlogger/models/invitation.py
@@ -132,6 +132,7 @@ def createInvitation(
'appletId': applet['_id'],
'created': now,
'updated': now,
+ 'role': role,
'size': 0,
'invitedBy': Profile().coordinatorProfile(
applet['_id'],
@@ -242,6 +243,7 @@ def htmlInvitation(
except:
skin = {}
instanceName = skin.get("name", "MindLogger")
+ role = invitation.get("role", "user")
try:
coordinator = Profile().coordinatorProfile(
applet['_id'],
@@ -273,8 +275,7 @@ def htmlInvitation(
Applet().listUsers(applet, 'reviewer', force=True)
)
body = """
-{greeting}ou have been invited {byCoordinator}to {appletName} on
-{instanceName}.
+{greeting}ou have been invited {byCoordinator}to be {role} of {appletName}{instanceName}.
{description}
{reviewers}
@@ -304,7 +305,9 @@ def htmlInvitation(
greeting="Welcome {}; y".format(
displayProfile['displayName']
) if 'displayName' in displayProfile else "Welcome! Y",
- instanceName=instanceName,
+ instanceName=" on {}".format(
+ instanceName
+ ) if instanceName is not None and len(instanceName) else "",
managers="