openlibhums / openlibhums/janeway

Implement a role hierarchy

Open
#4,142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature t-shirt epic
Dominant language
Python
Stars
238
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
Janeway implements a role system that currently has some implicit hierarchies:

  • Level 1. Django's own account attributes is_staff and is_superuser. These roles are set at the installation level and there are explicit checks across views and templates.
  • Level 2. Editor: A journal-level role that allows users to manage most of the journal settings and, more importantly, user accounts and their roles in the journal.
  • level 3. Other roles: The remaining roles grant users access to different parts of the editorial workflow but no management capabilities.

In v1.5.1, we introduced a configurable Journal Manager role that is intended to take over some of the powers from the editor role in installations where editors are not expected to manage the journal settings (or not all of them). By default, the journal manager has control over user accounts (same as the editor) and thus both are able to assign either role to any user.

Describe the solution you'd like

  • As the Janeway system, I have access to a role hierarchy that allows me to validate if a role-assignment request is valid. (e.g.: If a request to assign the journal manager is received from an editor, I can check where the editor role sits in the role-tree relative to the journal-manager role and grant/deny the request)
  • As an editor, when I'm using role assignment interfaces, I don't get the option to assign journal manager roles.

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.

Research direction

No files or tests are named. Start by tracing the existing role-assignment interfaces and the explicit role checks described in the issue; define how the editor and journal-manager roles relate in the hierarchy. Done means assignment requests are validated against that hierarchy and editors no longer see the journal-manager option.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.