diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 15086a41..ae5c8158 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,6 +11,8 @@ Unreleased
Added
-----
+- **Projectroles**
+ - Info link for finder role in ``ProjectRoleView`` (#1511)
- **Timeline**
- User count in siteinfo stats (#1504)
- Plugin tests (#1506)
diff --git a/docs/source/major_changes.rst b/docs/source/major_changes.rst
index 79d57b12..b8023a3d 100644
--- a/docs/source/major_changes.rst
+++ b/docs/source/major_changes.rst
@@ -18,8 +18,10 @@ Release Highlights
- Add auth type in user profile details card
- Add user count in timeline siteinfo statistics
+- Add finder role info link in member list
- Fix invite create view redirect failing in categories
- Fix requiring deprecated SODAR API settings in tests
+- General bug fixes and minor updates
v1.0.2 (2024-09-09)
diff --git a/projectroles/templates/projectroles/project_roles.html b/projectroles/templates/projectroles/project_roles.html
index d91d7557..6b824cdc 100644
--- a/projectroles/templates/projectroles/project_roles.html
+++ b/projectroles/templates/projectroles/project_roles.html
@@ -32,6 +32,7 @@
{% block projectroles_extend %}
{% get_role_perms project request.user as role_perms %}
+{% get_info_link finder_info as finder_info_link %}
@@ -87,6 +88,9 @@
{% else %}
{{ role_display }}
+ {% if role_as.role.name == 'project finder' %}
+ {{ finder_info_link | safe }}
+ {% endif %}
{% endif %}
diff --git a/projectroles/tests/test_views.py b/projectroles/tests/test_views.py
index da5d87de..24b677ad 100644
--- a/projectroles/tests/test_views.py
+++ b/projectroles/tests/test_views.py
@@ -71,6 +71,7 @@
FORM_INVALID_MSG,
PROJECT_WELCOME_MSG,
USER_PROFILE_LDAP_MSG,
+ ROLE_FINDER_INFO,
INVITE_LDAP_LOCAL_VIEW_MSG,
INVITE_LOCAL_NOT_ALLOWED_MSG,
INVITE_LOGGED_IN_ACCEPT_MSG,
@@ -2617,6 +2618,12 @@ def test_get(self):
[model_to_dict(m) for m in response.context['roles']], expected
)
self.assertNotIn('remote_role_url', response.context)
+ self.assertEqual(
+ response.context['finder_info'],
+ ROLE_FINDER_INFO.format(
+ categories='categories', projects='projects'
+ ),
+ )
def test_get_not_found(self):
"""Test GET view with invalid project UUID"""
diff --git a/projectroles/views.py b/projectroles/views.py
index a1ece660..f979949a 100644
--- a/projectroles/views.py
+++ b/projectroles/views.py
@@ -122,6 +122,10 @@
)
ROLE_CREATE_MSG = 'Membership granted with the role of "{role}".'
ROLE_UPDATE_MSG = 'Member role changed to "{role}".'
+ROLE_FINDER_INFO = (
+ 'User can see nested {categories} and {projects}, but can not access them '
+ 'without having a role explicitly assigned.'
+)
SEARCH_DICT_DEPRECATE_MSG = (
'Results from search() as a dict have been deprecated and support will be '
'removed in v1.1. Provide results as a list of PluginSearchResult objects '
@@ -1719,6 +1723,10 @@ def get_context_data(self, *args, **kwargs):
] = project.get_source_site().url + reverse(
'projectroles:roles', kwargs={'project': project.sodar_uuid}
)
+ context['finder_info'] = ROLE_FINDER_INFO.format(
+ categories=get_display_name(PROJECT_TYPE_CATEGORY, plural=True),
+ projects=get_display_name(PROJECT_TYPE_PROJECT, plural=True),
+ )
return context
|