Compare commits

..

2 Commits

Author SHA1 Message Date
c5bd3d138e Attempt to fix loading issues when oauth is not responding 2025-06-03 11:08:36 +01:00
d5f63f4387 Add dependabot config 2025-05-27 17:52:05 +01:00
3 changed files with 41 additions and 2 deletions

29
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
version: 2
updates:
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
open-pull-requests-limit: 8
allow:
- dependency-type: "all"
reviewers:
- "Cian-H"
assignees:
- "Cian-H"
commit-message:
prefix: "uv-deps"
prefix-development: "uv-deps-dev"
include: "scope"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "04:00"
open-pull-requests-limit: 5
commit-message:
prefix: "ci"

View File

@@ -8,4 +8,4 @@
"""Metadata for this python module."""
__version__ = "2025.5.20.8"
__version__ = "2025.6.3"

View File

@@ -8,6 +8,7 @@
"""invenio module for I-Form theme."""
from flask import g, has_request_context
from flask_login import login_required
from invenio_records_marc21.ui.theme import current_identity_can_view
@@ -34,7 +35,16 @@ class InvenioThemeIform(object):
@app.context_processor
def inject_visibility():
return {"can_view_marc21": current_identity_can_view()}
def can_view_marc21():
try:
# Only check if we're in a request context and identity exists
if has_request_context() and hasattr(g, "identity") and g.identity:
return current_identity_can_view()
return False
except (AttributeError, RuntimeError):
return False
return {"can_view_marc21": can_view_marc21()}
app.extensions["invenio-theme-iform"] = self