Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge v0.13.3 release #1345

Merged
merged 24 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b1da4b2
fix sodar-btn-submit-once spinner padding (#1291)
mikkonie Sep 29, 2023
bd3d834
fix hidden json app setting updating (#1295)
mikkonie Oct 5, 2023
0a158f1
fix get_timestamp() crash with missing ProjectEventStatus (#1297)
mikkonie Oct 6, 2023
6ac246c
add common project badge (#1299, #1300)
mikkonie Oct 18, 2023
4657a3c
fix perform_project_modify() request arg (#1301)
mikkonie Oct 19, 2023
6520276
fix custom app settings validation (#1305, #1306, #1307, #1308)
mikkonie Oct 25, 2023
50fdc83
add InvalidFormMixin (#1310)
mikkonie Oct 25, 2023
3a178d7
fix example app imports
mikkonie Oct 25, 2023
7a7e76e
upgrade to werkzeug>=3.0.1 (#1312)
mikkonie Oct 26, 2023
eaf280e
fix PROJECT_USER app setting remote sync (#1315, #1320)
mikkonie Nov 1, 2023
a2b6b07
prevent remote project global app settings update (#1318)
mikkonie Nov 2, 2023
ca7ccef
update project_star setting to local (#1321)
mikkonie Nov 3, 2023
a9fb873
fix remote sync app settings update issues (#1324, #1330)
mikkonie Nov 6, 2023
15174e8
add user login/logout logging signals (#1326)
mikkonie Nov 6, 2023
118b2f9
fix app plugin ui highlighting (#1331, #1332, #1334)
mikkonie Nov 14, 2023
6cfe4ae
add timeline empty object reference handling (#1338)
mikkonie Nov 15, 2023
2cf6867
add createdevusers management command (#1339)
mikkonie Nov 20, 2023
9cbf1d4
add ldap tls and user filter setup (#1340)
mikkonie Nov 20, 2023
5969122
cleanup for v0.13.3 release (#1296)
mikkonie Nov 22, 2023
513a412
upgrade to django>=3.2.23 (#1312)
mikkonie Nov 22, 2023
2771b43
fix major changes doc (#1296)
mikkonie Nov 22, 2023
98e84d1
update timeline object ref empty name handling (#1341)
mikkonie Nov 23, 2023
7620f8e
fix obj ref uuid (#1341)
mikkonie Nov 23, 2023
11b666c
prepare v0.13.3 release (#1296)
mikkonie Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release_cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: 'mikkonie'

TBA

## Issues to add to CHANGELOG
## Issues to Add in CHANGELOG

TBA

Expand Down
71 changes: 71 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,77 @@ Changelog for the **SODAR Core** Django app package. Loosely follows the
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.


v0.13.3 (2023-12-06)
====================

Added
-----

- **General**
- LDAP settings for TLS and user filter (#1340)
- ``LDAP_DEBUG`` Django setting
- **Projectroles**
- ``_project_badge.html`` template (#1300)
- ``InvalidFormMixin`` helper mixin (#1310)
- Temporary ``user_name`` param in remote sync app settings (#1320)
- User login/logout logging signals (#1326)
- ``createdevusers`` management command (#1339)

Changed
-------

- **General**
- Upgrade minimum Django version to v3.2.23 (#1312)
- Upgrade general Python dependencies (#1312)
- **Appalerts**
- Use projectroles project badge templage (#1300)
- **Bgjobs**
- Provide correct URL patterns to plugins (#1331)
- Rename ``bgjobs_site`` plugin (#1332)
- **Projectroles**
- Prevent updating global settings for remote projects in ``AppSettingAPI`` (#1318)
- Change ``project_star`` app setting to ``local`` (#1321)
- **Timeline**
- Truncate long project titles in badge (#1299)
- Use projectroles project badge templage (#1300)
- Provide correct URL patterns to plugins (#1331)
- **Tokens**
- Rename ``tokens`` plugin (#1334)

Fixed
-----

- **Appalerts**
- Missing URL patterns in app plugin (#1331)
- **Projectroles**
- Browser-specific ``sodar-btn-submit-once`` spinner padding (#1291)
- Hidden JSON app settings reset on non-superuser project update (#1295)
- Request object not provided to ``perform_project_modify()`` on create (#1301)
- ``validate_form_app_settings()`` not called in ``ProjectForm`` (#1305)
- Unhandled exceptions in ``validate_form_app_settings()`` calls (#1306)
- ``validate_form_app_settings()`` results handling crash in ``ProjectForm`` (#1307)
- ``RoleAssignment`` provided to ``validate_form_app_settings()`` in ``ProjectForm`` (#1308)
- ``PROJECT_USER`` app settings remote sync failure (#1315)
- Local app settings overridden by remote sync (#1324)
- Local app setting value comparison failing in remote sync (#1330)
- Active app highlight failing for multi-plugin apps (#1331)
- Active app highlight failing for remote site views (#1331)
- **Timeline**
- ``get_timestamp()`` template tag crash from missing ``ProjectEventStatus`` (#1297)
- Empty object reference name handling in ``add_object()`` (#1338, #1341)
- **Tokens**
- Missing URL patterns in app plugin (#1331)
- **Userprofile**
- Unhandled exceptions in ``validate_form_app_settings()`` calls (#1306)
- ``validate_form_app_settings()`` results handling crash in ``UserSettingForm`` (#1307)

Removed
-------

- **Timeline**
- ``_project_badge.html`` template (#1300)


v0.13.2 (2023-09-21)
====================

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ and breaking changes are possible.

.. code-block:: console

pip install django-sodar-core==0.13.2
pip install django-sodar-core==0.13.3

For installing a development version you can point your dependency to a specific
commit ID in GitHub. Note that these versions may not be stable.
Expand Down
4 changes: 2 additions & 2 deletions adminalerts/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
class SiteAppPlugin(SiteAppPluginPoint):
"""Projectroles plugin for registering the app"""

#: Name (slug-safe, used in URLs)
#: Name (used as plugin ID)
name = 'adminalerts'

#: Title (used in templates)
title = 'Admin Alerts'

#: App URLs (will be included in settings by djangoplugins)
#: UI URLs
urls = urlpatterns

#: Iconify icon
Expand Down
3 changes: 3 additions & 0 deletions adminalerts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
LoggedInPermissionMixin,
HTTPRefererMixin,
CurrentUserFormMixin,
InvalidFormMixin,
)

from adminalerts.forms import AdminAlertForm
Expand Down Expand Up @@ -74,6 +75,7 @@ class AdminAlertCreateView(
AdminAlertModifyMixin,
HTTPRefererMixin,
CurrentUserFormMixin,
InvalidFormMixin,
CreateView,
):
"""AdminAlert creation view"""
Expand All @@ -88,6 +90,7 @@ class AdminAlertUpdateView(
AdminAlertModifyMixin,
HTTPRefererMixin,
CurrentUserFormMixin,
InvalidFormMixin,
UpdateView,
):
"""AdminAlert updating view"""
Expand Down
9 changes: 5 additions & 4 deletions appalerts/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@
from projectroles.plugins import SiteAppPluginPoint, BackendPluginPoint

from appalerts.api import AppAlertAPI
from appalerts.urls import urlpatterns


class SiteAppPlugin(SiteAppPluginPoint):
"""Site plugin for application alerts"""

#: Name (slug-safe, used in URLs)
#: Name (used as plugin ID)
name = 'appalerts'

#: Title (used in templates)
title = 'App Alerts'

#: App URLs (will be included in settings by djangoplugins)
urls = []
#: UI URLs
urls = urlpatterns

#: Iconify icon
icon = 'mdi:alert-octagram'
Expand All @@ -35,7 +36,7 @@ class SiteAppPlugin(SiteAppPluginPoint):
class BackendPlugin(BackendPluginPoint):
"""Backend plugin for application alerts"""

#: Name (slug-safe, used in URLs)
#: Name (used as plugin ID)
name = 'appalerts_backend'

#: Title (used in templates)
Expand Down
30 changes: 3 additions & 27 deletions appalerts/templates/appalerts/alert_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
{% block css %}
{{ block.super }}
<style type="text/css">
.sodar-app-alert-project-badge {
vertical-align: top;
margin-top: 2px;
overflow: hidden;
text-overflow: ellipsis;
max-width: 300px;
}
.sodar-app-alert-project-badge a {
color: inherit;
}
.sodar-app-alert-row div:nth-child(1) {
max-width: 40px;
}
Expand Down Expand Up @@ -95,21 +85,7 @@ <h2>
</div>
<div class="col pl-0">
{% if a.project %}
<span class="badge sodar-app-alert-project-badge mr-1
badge-{% if not a.project or can_view_project %}{{ a.level | lower }}{% else %}secondary{% endif %}"
title="{% get_display_name a.project.type title=True %}: {{ a.project.title }}"
data-toggle="tooltip" data-placement="top">
<i class="iconify"
data-icon="{% if a.project.type == 'PROJECT' %}mdi:cube{% else %}mdi:rhombus-split{% endif %}">
</i>
{% if can_view_project %}
<a href="{% url 'projectroles:detail' project=a.project.sodar_uuid %}">
{{ a.project.title }}
</a>
{% else %}
{{ a.project.title }}
{% endif %}
</span>
{% include 'projectroles/_project_badge.html' with project=a.project color=a.level can_view=can_view_project %}
{% endif %}
{{ a.message | safe }}
</div>
Expand Down Expand Up @@ -217,15 +193,15 @@ <h2>
showCancelLink: true
});
}
if ($('.sodar-app-alert-project-badge').length) {
if ($('.sodar-project-badge').length) {
tour.addStep('alert', {
title: 'Alert {% get_display_name 'PROJECT' title=True %} or ' +
'{% get_display_name 'CATEGORY' title=True %}',
text: 'This badge links to the ' +
'{% get_display_name 'PROJECT' %} or ' +
'{% get_display_name 'CATEGORY' %} to which the alerted ' +
'activity is related.',
attachTo: '.sodar-app-alert-project-badge top',
attachTo: '.sodar-project-badge top',
advanceOn: '.docs-link click',
showCancelLink: true
});
Expand Down
17 changes: 11 additions & 6 deletions bgjobs/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
# Projectroles dependency
from projectroles.plugins import ProjectAppPluginPoint, SiteAppPluginPoint

from bgjobs.urls import urlpatterns
from bgjobs.urls import urls_ui_project, urls_ui_site


class ProjectAppPlugin(ProjectAppPluginPoint):
"""Plugin for registering app with Projectroles"""

#: Name (used as plugin ID)
name = 'bgjobs'

#: Title (used in templates)
title = 'Background Jobs'
urls = urlpatterns

#: UI URLs
urls = urls_ui_project

#: Iconify icon
icon = 'mdi:server'
Expand Down Expand Up @@ -61,14 +66,14 @@ class BackgroundJobsPluginPoint(PluginPoint):
class SiteAppPlugin(SiteAppPluginPoint):
"""Projectroles plugin for registering the app"""

#: Name (slug-safe, used in URLs)
name = 'sitebgjobs'
#: Name (used as plugin ID)
name = 'bgjobs_site'

#: Title (used in templates)
title = 'Site Background Jobs'

#: App URLs (will be included in settings by djangoplugins)
urls = urlpatterns
#: UI URLs
urls = urls_ui_site

#: Iconify icon
icon = 'mdi:server'
Expand Down
9 changes: 7 additions & 2 deletions bgjobs/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

app_name = 'bgjobs'

urlpatterns = [
urls_ui_project = [
# List jobs that the user has access to
path(
route='list/<uuid:project>',
Expand All @@ -29,10 +29,15 @@
view=views.BackgroundJobClearAllView.as_view(),
name='clear_all',
),
# List global background jobs
]

urls_ui_site = [
# List site background jobs
path(
route='list',
view=views.GlobalBackgroundJobView.as_view(),
name='site_list',
),
]

urlpatterns = urls_ui_project + urls_ui_site
6 changes: 3 additions & 3 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
],
"identifier": "https://doi.org/10.5281/zenodo.4269346",
"codeRepository": "https://github.com/bihealth/sodar-core",
"datePublished": "2023-09-21",
"dateModified": "2023-09-21",
"datePublished": "2023-12-06",
"dateModified": "2023-12-06",
"dateCreated": "2019-06-26",
"description": "SODAR Core: A Django-based framework for scientific data management and analysis web apps",
"keywords": "Python, Django, scientific data managmenent, software library",
"license": "MIT",
"title": "SODAR Core",
"version": "v0.13.2"
"version": "v0.13.3"
}
32 changes: 27 additions & 5 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@
# Enable LDAP if configured
ENABLE_LDAP = env.bool('ENABLE_LDAP', False)
ENABLE_LDAP_SECONDARY = env.bool('ENABLE_LDAP_SECONDARY', False)
LDAP_DEBUG = env.bool('LDAP_DEBUG', False)

# Alternative domains for detecting LDAP access by email address
LDAP_ALT_DOMAINS = env.list('LDAP_ALT_DOMAINS', None, [])
Expand All @@ -348,9 +349,10 @@
import ldap
from django_auth_ldap.config import LDAPSearch

if LDAP_DEBUG:
ldap.set_option(ldap.OPT_DEBUG_LEVEL, 255)
# Default values
LDAP_DEFAULT_CONN_OPTIONS = {ldap.OPT_REFERRALS: 0}
LDAP_DEFAULT_FILTERSTR = '(sAMAccountName=%(user)s)'
LDAP_DEFAULT_ATTR_MAP = {
'first_name': 'givenName',
'last_name': 'sn',
Expand All @@ -361,12 +363,22 @@
AUTH_LDAP_SERVER_URI = env.str('AUTH_LDAP_SERVER_URI', None)
AUTH_LDAP_BIND_DN = env.str('AUTH_LDAP_BIND_DN', None)
AUTH_LDAP_BIND_PASSWORD = env.str('AUTH_LDAP_BIND_PASSWORD', None)
AUTH_LDAP_CONNECTION_OPTIONS = LDAP_DEFAULT_CONN_OPTIONS
AUTH_LDAP_START_TLS = env.str('AUTH_LDAP_START_TLS', False)
AUTH_LDAP_CA_CERT_FILE = env.str('AUTH_LDAP_CA_CERT_FILE', None)
AUTH_LDAP_CONNECTION_OPTIONS = {**LDAP_DEFAULT_CONN_OPTIONS}
if AUTH_LDAP_CA_CERT_FILE is not None:
AUTH_LDAP_CONNECTION_OPTIONS[
ldap.OPT_X_TLS_CACERTFILE
] = AUTH_LDAP_CA_CERT_FILE
AUTH_LDAP_CONNECTION_OPTIONS[ldap.OPT_X_TLS_NEWCTX] = 0
AUTH_LDAP_USER_FILTER = env.str(
'AUTH_LDAP_USER_FILTER', '(sAMAccountName=%(user)s)'
)

AUTH_LDAP_USER_SEARCH = LDAPSearch(
env.str('AUTH_LDAP_USER_SEARCH_BASE', None),
ldap.SCOPE_SUBTREE,
LDAP_DEFAULT_FILTERSTR,
AUTH_LDAP_USER_FILTER,
)
AUTH_LDAP_USER_ATTR_MAP = LDAP_DEFAULT_ATTR_MAP
AUTH_LDAP_USERNAME_DOMAIN = env.str('AUTH_LDAP_USERNAME_DOMAIN', None)
Expand All @@ -386,12 +398,22 @@
AUTH_LDAP2_SERVER_URI = env.str('AUTH_LDAP2_SERVER_URI', None)
AUTH_LDAP2_BIND_DN = env.str('AUTH_LDAP2_BIND_DN', None)
AUTH_LDAP2_BIND_PASSWORD = env.str('AUTH_LDAP2_BIND_PASSWORD', None)
AUTH_LDAP2_CONNECTION_OPTIONS = LDAP_DEFAULT_CONN_OPTIONS
AUTH_LDAP2_START_TLS = env.str('AUTH_LDAP2_START_TLS', False)
AUTH_LDAP2_CA_CERT_FILE = env.str('AUTH_LDAP2_CA_CERT_FILE', None)
AUTH_LDAP2_CONNECTION_OPTIONS = {**LDAP_DEFAULT_CONN_OPTIONS}
if AUTH_LDAP2_CA_CERT_FILE is not None:
AUTH_LDAP2_CONNECTION_OPTIONS[
ldap.OPT_X_TLS_CACERTFILE
] = AUTH_LDAP2_CA_CERT_FILE
AUTH_LDAP2_CONNECTION_OPTIONS[ldap.OPT_X_TLS_NEWCTX] = 0
AUTH_LDAP2_USER_FILTER = env.str(
'AUTH_LDAP2_USER_FILTER', '(sAMAccountName=%(user)s)'
)

AUTH_LDAP2_USER_SEARCH = LDAPSearch(
env.str('AUTH_LDAP2_USER_SEARCH_BASE', None),
ldap.SCOPE_SUBTREE,
LDAP_DEFAULT_FILTERSTR,
AUTH_LDAP2_USER_FILTER,
)
AUTH_LDAP2_USER_ATTR_MAP = LDAP_DEFAULT_ATTR_MAP
AUTH_LDAP2_USERNAME_DOMAIN = env.str('AUTH_LDAP2_USERNAME_DOMAIN')
Expand Down
2 changes: 1 addition & 1 deletion docs/source/app_projectroles_integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ release tag or commit ID.

.. code-block:: console

django-sodar-core==0.13.2
django-sodar-core==0.13.3

Install the requirements for development:

Expand Down
Loading