Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
a4f4f40
WIP for Iowa State repo orgs.
ajrbyers Dec 3, 2024
ebaaac5
WIP for repo ous
ajrbyers Mar 12, 2025
a0b7d1d
feat(repo): wip for multiple object types in repositories.
ajrbyers Jun 5, 2025
063023b
wip(repo): A WIP for multip object types in janeway's repo.
ajrbyers Jun 10, 2025
2c8b308
fix: only show enabled subjects
ajrbyers Jun 12, 2025
a5215bc
Changes to core for the isolinear plugin.
ajrbyers Oct 20, 2023
0efd6ee
Updated hooks to return a default value rather than none.
ajrbyers Nov 7, 2023
f6f20b5
Add option for identifiers to link to preprint version and reviews.
ajrbyers Nov 7, 2023
0190894
Updates to identifiers.
ajrbyers Nov 7, 2023
9dc41d3
Updates to journal.
ajrbyers Nov 7, 2023
5af87ad
Updates to repository.
ajrbyers Nov 7, 2023
e12ca15
Updates to review.
ajrbyers Nov 7, 2023
cc53a5c
Sundry updates.
ajrbyers Nov 7, 2023
7ee6f8f
Template updates.
ajrbyers Nov 7, 2023
897ac56
Remove a migration
ajrbyers Nov 7, 2023
402d88a
Remove pprint
ajrbyers Nov 7, 2023
5910d10
Tweak pattern
ajrbyers Nov 7, 2023
f716f74
Added isolinear migrations
ajrbyers Nov 8, 2023
3dd85f1
Add new setting and event for minting review DOIs.
ajrbyers Nov 8, 2023
2d5a9aa
Preprint minting will return the errot text instead of None.
ajrbyers Nov 8, 2023
0f74517
Allow the file field of a version to be null for flexibility.
ajrbyers Nov 8, 2023
eb2bd38
The display public switch now only displays if OR is on and the revie…
ajrbyers Nov 8, 2023
0d77bc0
Change import to correct module.
ajrbyers Nov 8, 2023
255b535
Change how review patterns are generated.
ajrbyers Nov 8, 2023
0a3c4a5
Tidied up the OLH theme article page.
ajrbyers Nov 8, 2023
46d02d4
Crossref deposit now runs via an event, remove this.
ajrbyers Nov 8, 2023
6c8ddb3
Adds various options including the option to set a license for open p…
ajrbyers Nov 10, 2023
a1552dc
Alter article page default ordering.
ajrbyers Nov 16, 2023
e184ab8
Added a new stage log list method.
ajrbyers Dec 18, 2023
b15ea2f
Adding unstaged changes from infinity/uclpress.
ajrbyers Jan 24, 2024
1c87f15
Add missing comma.
ajrbyers Jan 24, 2024
c37df19
Fix conflicting migrations
mauromsl Jan 24, 2024
5c0cc74
Updates the preprint API to include versions and public download links.
ajrbyers Jan 31, 2024
82a4b17
Adds POST, PUT and DELETE to the preprint api endpoints.
ajrbyers Mar 7, 2024
815e57e
Fixes missing repo when creating a new subject
ajrbyers Mar 7, 2024
fbbaf99
Adds an endpoint for adding preprintfiles.
ajrbyers Mar 19, 2024
eef8b97
Adds a user preprints view.
ajrbyers Jul 16, 2024
b71e9c9
Handle potentially missing objects.
ajrbyers Jul 16, 2024
c9a5dca
Add account filtering by ORCID.
ajrbyers Jul 16, 2024
664468d
Added a subject endpoint that shows preprints in the subject
ajrbyers Jul 16, 2024
0b61c8d
Adds updates required by Carbon Plan.
ajrbyers Aug 6, 2024
2d343a3
Fixes PreprintSubjectGroupSerializer.
ajrbyers Aug 20, 2024
091bf04
Tweaked features.
ajrbyers Aug 28, 2024
6f34235
Adds API filters.
ajrbyers Sep 13, 2024
ee9afcb
Adds an email when a new version is uploaded.
ajrbyers Sep 13, 2024
f00a476
Remove non updated supp files.
ajrbyers Sep 17, 2024
75a3020
Added reg and activation endpoints.
ajrbyers Sep 24, 2024
b4b2140
Added logout and removed password requirement
ajrbyers Oct 11, 2024
8a8d126
Adds some requested fixes.
ajrbyers Oct 25, 2024
a77390e
WIP - adds preprint version dois to identifier pages
ajrbyers Nov 13, 2024
2a618a3
Preprint version dois can now be polled for status.
ajrbyers Nov 14, 2024
eaddfe7
Tweaks form logic, adds note for repos.
ajrbyers Nov 14, 2024
df21b97
Adds an identifiers endpoint.
ajrbyers Nov 19, 2024
0f57beb
Limits published preprints to the current repo.
ajrbyers Nov 21, 2024
acc4b7c
Add support for multi subject filtering
ajrbyers May 8, 2025
e193bf0
Add remote fix
ajrbyers May 8, 2025
9597d06
chore: fixing issues post merge.
ajrbyers Feb 26, 2026
a5363cc
chore: add DELETE to permission list on API
ajrbyers Feb 27, 2026
853665b
chore: updates account endpoint wording.
ajrbyers Mar 11, 2026
a059fe1
fix: warn on incompatible plugin version in debug mode, raise otherwise
ajrbyers Mar 11, 2026
4147d2d
chore: rename permission function.
ajrbyers Mar 11, 2026
bb8b2ce
refactor: simplify return logic in hooks
ajrbyers Mar 11, 2026
84bc975
fix: guard against None obj before accessing crossrefstatus_set in admin
ajrbyers Mar 11, 2026
d2e577f
fix: use response.ok instead of checking for status code 200
ajrbyers Mar 11, 2026
1a84f08
chore: move submission start styles to admin.css and use CSS custom p…
ajrbyers Mar 11, 2026
18fbb37
chore: move OLH hierarchy styles to app.scss
ajrbyers Mar 11, 2026
6cb4665
chore: ruff formatting
ajrbyers Mar 12, 2026
0b2e2c1
Merge branch 'master' into integration/iowa-and-isolinear
ajrbyers Mar 12, 2026
9b8eae0
fix: adds missing max_lengths
ajrbyers Mar 12, 2026
0283308
Merge remote-tracking branch 'origin/integration/iowa-and-isolinear' …
ajrbyers Mar 12, 2026
863b4af
chore: more ruff formatting
ajrbyers Mar 12, 2026
2180adb
chore: hopefully the last fix here.
ajrbyers Mar 12, 2026
8dde431
ci: Use in-memory sqlite for tests
mauromsl Mar 12, 2026
157754c
chore: fix migrations
ajrbyers Mar 12, 2026
36fe723
fix: fixes journal_defaults.json from bad merge
ajrbyers Mar 12, 2026
5a93be3
fix: reverts use of abstract_display
ajrbyers Mar 12, 2026
d59dd58
fix adds kwargs to URL tag
ajrbyers Mar 12, 2026
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Set up environment variables
run: |
echo "DB_VENDOR=sqlite" >> "$GITHUB_ENV"
echo "DB_NAME=:memory:" >> "$GITHUB_ENV"
echo "JANEWAY_SETTINGS_MODULE=core.janeway_global_settings" >> "$GITHUB_ENV"


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ markdown
maxminddb==2.5.1
mock
mozilla-django-oidc==4.0.1
openpyxl==3.1.5
orcid==1.0.3
packaging==23.2
pdfkit==1.0.0
Expand Down
47 changes: 47 additions & 0 deletions src/api/permissions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from django.core.exceptions import PermissionDenied
from django.shortcuts import get_object_or_404

from rest_framework import permissions

from repository import models as rm


class IsEditor(permissions.BasePermission):
message = "Please ensure the user is an Editor or Staff Member."
Expand Down Expand Up @@ -29,3 +32,47 @@ def has_permission(self, request, view):

if request.user.is_section_editor(request):
return True


class IsRepositoryManager(permissions.BasePermission):
message = "Please ensure the user is a manager of this repository."

def has_permission(self, request, view):
if request.user and not request.user.is_authenticated:
return False

if not request.repository:
return False

if request.user.is_staff:
return True

if request.repository and request.user in request.repository.managers.all():
return True


class CanEditPreprint(permissions.BasePermission):
message = "You must be the owner of this preprint to edit it."

def has_permission(self, request, view):
# grant access to non-create/update requests
if request.method not in ["PUT", "PATCH", "DELETE"]:
return True

# grant access if user is the preprint's owner
preprint_id = request.data.get("pk")
if not preprint_id:
preprint_id = view.kwargs.get("pk")

preprint = get_object_or_404(
rm.Preprint,
pk=preprint_id,
)
if request.user == preprint.owner:
return True

if request.user.is_staff:
return True

# Otherwise don't grant access
return False
Loading
Loading