Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@martin-rueegg
Copy link
Contributor

@martin-rueegg martin-rueegg commented Dec 13, 2023

The current PR does

  • Introduce a PermissionActiveRecord from which models that store permissions should derive from
  • Optimizes the indices (primary keys) for the PermissionActiveRecords
    • group_id (and contentcontainer_id/contentcontainer_class) must be first in the index, as those fields are used in all queries, while module_id and permission_id are only used on some queries.
  • Enforces types on BasePermission and PermissionManager
  • Prepares for transition to use integer group_id also for content container groups and allowing additional group states (e.g. "read-only"/"write-only" or for states: "set-only"/"unset-only"

PR Admin

What kind of change does this PR introduce?

  • Code style update
  • Refactor

Does this PR introduce a breaking change?

  • Yes

If yes, please describe the impact and migration path for existing applications:

Type restrictions as documented in MIGRATE-DEV.md

The PR fulfills these requirements

  • It's submitted to the develop branch, not the master branch if no hotfix
  • All tests are passing
  • New/updated tests are included
  • Changelog was modified

@martin-rueegg martin-rueegg changed the title Enh: permissions Enh: Optimize permissions Dec 13, 2023
@martin-rueegg
Copy link
Contributor Author

Failing tests due to

@luke-
Copy link
Contributor

luke- commented Dec 14, 2023

@martin-rueegg Thanks, FYI, will need some time for this PR

@martin-rueegg
Copy link
Contributor Author

martin-rueegg commented Dec 18, 2023

In the light of

I have removed all type restrictions of fields and method return values.

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.

2 participants