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

IA-3893 Extract plugins permissions from main codebase #1947

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mathvdh
Copy link
Collaborator

@mathvdh mathvdh commented Jan 30, 2025

Currently plugins permissions are in the main codebase in hat/menupermissions.
This is an attempt to extract them into the plugin codebase without breaking everything and provide an example and the mechanisms to do it for other plugins like trypelim.

Related JIRA tickets : IA-3893

Self proofreading checklist

  • Did I use eslint and black formatters
  • Is my code clear enough and well documented
  • Are my typescript files well typed
  • New translations have been added or updated if new strings have been introduced in the frontend
  • My migrations file are included
  • Are there enough tests
  • Documentation has been included (for new feature)

Doc

See in ...

Changes

  • Extract POLIO permissions from hat/menupermissions
  • Put into POLIO_PLUGIN_ROOT/permissions.py
  • Create a new Permissions "fake" model for Polio.
  • Create a "fake" migration for this model.
  • Create a custom migration to change all the permissions from the old one to new one for each user.
  • Modifications to hat/menupermissions to load pernissions from plugins.

How to test

Nothing should change for the user and all polio pages should still work normally.

Follow the Conventional Commits specification

The merge message of a pull request must follow the Conventional Commits specification.

This convention helps to automatically generate release notes.

Use lowercase for consistency.

Example:

fix: empty instance pop up

Refs: IA-3665

Note that the Jira reference is preceded by a line break.

Both the line break and the Jira reference are entered in the Add an optional extended description… field.

@mathvdh mathvdh changed the title IA-3893 Initial Commit IA-3893 Extract plugins permissions from main codebase Jan 30, 2025
@mathvdh mathvdh marked this pull request as ready for review January 30, 2025 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant