Skip to content

Refactor of item-level permission to be more intuitive #3760

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

Merged
merged 19 commits into from
Oct 14, 2022

Conversation

ssddanbrown
Copy link
Member

@ssddanbrown ssddanbrown commented Oct 2, 2022

Related to #410

Also makes the item permissions view much more mobile responsive.

Todo

  • Fix existing use of permission page JavaScript (Row toggle)
  • Add interface support for selecting/adding additional roles.
  • Add new "Other Roles" option.
  • Migrate & drop existing entity permissions where restricted=0. DOCUMENT.
  • Migrate existing restricted=1 item entries with new "Other Roles" option with no permissions.
  • Drop restricted entity field.
  • Translations for strings.
  • Update "Restricted" search filter.
  • Update restricted indicator in entity details view partial.
  • Fix shelf-copy-permissions functionality.
  • Handle/warn/document removal of restricted field in API data (If exists). Not part of API data AFAICT.
  • Dark mode support check
  • Update item-permission page with new intro text.
    • Mention cascade behaviour for chapters and books?
  • Scenario test manually - Scenario Testing
  • Re-test migration from old DB content
  • Test dropping of entity-permissions on non-restricted entities upon upgrade.
  • Test migration of restricted=1 entries to new "Other Role" active entries.
  • Test PermissionApplicator@hasEntityPermission logic.
  • Test migration on MySQL container (upon dev mariadb setup)
  • Test migration on demo instance db copy.

Docs Updates

  • Update note: General advisory of significant change of entity permission application.
    • Update note: Advise that previous rows in custom permissions, with nothing selected, will not be visible since the "Everyone Else" fallback handles this instead now.
  • Update note: Inactive Entity permissions will be deleted upon upgrade.

@ssddanbrown ssddanbrown self-assigned this Oct 2, 2022
@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Oct 2, 2022
@ssddanbrown ssddanbrown changed the title Refactor of item-level permission to be more intuative Refactor of item-level permission to be more intuitive Oct 2, 2022
Removed now unused JS entity-permissions compontent.
Updated existing permissions-table compontent to newer format.
Removed now unused translation string.
Nothing on back-end logic done to hook this new option up.
Addition of permissions for role_id=0 works out of the box, but active
"everyone else" permissions, with no priviliges, is currently not
working. Needs change of permission gen logic also.
Simplifies structure and limits content count, while allowing direct
mapping of new UI intent, where we may have entries with no permissions.
Not yet updated app logic to suit.

Tested via migrating and rolling-back, then comparing export data,
across a set of custom permission entries.
Also introduced helpers for getting entities by slugs since we do it in
so many places.
Also updates show roles on permission view to just those with
permissions applied.
Fixes rounded borders for lone permission rows.
Moves "Everyone Else" handling from role to new class.
- Fixed inheriting control for new system.
- Tested copying shelf permissions to books.
- Added additional handling for inheriting scenario identification.
@ssddanbrown ssddanbrown merged commit 22a91c9 into development Oct 14, 2022
@ssddanbrown ssddanbrown deleted the item_permission_revamp branch October 14, 2022 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant