openlibhums / openlibhums/janeway

Admin permission bug

Open
#4,635 4 comments 0 reactions 1 assignee View on GitHub

@ajrbyers is already working on this.

Since May 1, 2025.

bug Priority medium Size XL
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Describe the bug
is_admin does not grant permission to access the Admin interface.
If a user is only is_admin they encounter an error (see below). If a user has both is_admin and is_staff, they can access the admin interface, but it informs them they do not have appropriate permissions.

This was tested on both path mode (/doctest) and a single journal install (Playtest). Based on testing, only is_superuser can access the Admin interface. It makes is_admin currently not a not particularly practical role.

(What is_admin does appear to allow is for is_staff to be able to see that they are staff and untick that box. When a user only has is_staff they cannot see that they are staff or untick it. is_admin can give themselves and others is_staff. Not sure if that is intentional? I assume so as I think they are meant to be able to access the admin interface. Again, tested on both options, is_admin by itself cannot access the press level manager.)

Note: tested by logging in as users as well as controlling them, to be absolutely sure.
Janeway version
1.7

Screenshots
User is_admin
Image
'Admin does not show on menu dropdown on front page'

User is_staff and is_admin
Image
'Admin' also shows in menu dropdown on front page.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.