[Bug 41551] New: Build migration tool for new permissions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Bug ID: 41551 Summary: Build migration tool for new permissions Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: lisette@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org migrate to new setup with database update, make an upgrade wizard for super librarians to set up new/learn new system and clean up existing permissions -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |41549, 41550 Blocks| |20813 CC| |martin.renvoize@openfifth.c | |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20813 [Bug 20813] Revamp user permissions system https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41549 [Bug 41549] Add Koha::Permission object https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41550 [Bug 41550] Add Koha::Role object -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38140 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38140 [Bug 38140] Update Acquisition.pm, Budgets.pm, about.pl, and other users of authorization data checks outside of the initial AuthZ check on page load -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38141 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38141 [Bug 38141] Move "flags" column into "user_permissions" table -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|41550 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41550 [Bug 41550] Add Koha::AccessControl::Role object -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|41549 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41549 [Bug 41549] Add Koha::AccessControl::Permission object -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 --- Comment #1 from Lisette Scheer <lisette@bywatersolutions.com> --- Migration Strategy Phase 1: Parallel Implementation (6-12 months) Implement new schema alongside old Create Koha::Role, Koha::Permission classes Build migration tools Create default system roles Add admin UI for role management Bugs: Koha::Permission Koha::Role, Create default system roles, Add admin UI for role management Build migration tools - - including an upgrade wizard? migrate to new ones, make an upgrade wizard for super librarians to set up new/learn new system Update checker Barebone objects by hackfest Submit phase 1 end of cycle for early 26.11 push Phase 2: Dual-Mode Operation (12-18 months) Support both old and new permission systems Add syspref: UseNewPermissionSystem (default: off) Gradually migrate core Koha code to use new API Plugin developers can adopt new system Phase 3: Data Migration (6 months) Automated migration tool: Old Permission → New Role Mapping superlibrarian → Superlibrarian role circulate → Circulation Staff role editcatalogue → Cataloger role etc. Custom permission combinations → custom roles Validation and testing period Phase 4: Deprecation (1-2 years) Mark old system deprecated All new features use only new system Community testing and feedback Phase 5: Removal (Next major version) Remove old tables (userflags, permissions, user_permissions) Remove compatibility layer Clean up documentation Total Timeline: 3-5 years for complete migration -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41551 --- Comment #2 from Lisette Scheer <lisette@bywatersolutions.com> --- Backward Compatibility Permission Mapping Table CREATE TABLE permission_mapping ( old_module VARCHAR(64), old_code VARCHAR(64), new_resource VARCHAR(64), new_action VARCHAR(64), new_scope VARCHAR(64), PRIMARY KEY (old_module, old_code) ); -- Examples: INSERT INTO permission_mapping VALUES ('borrowers', 'edit_borrowers', 'patrons', 'update', 'own_library'), ('tools', 'items_batchmod', 'items', 'batch_modify', 'own_library'), ('acquisition', 'budget_manage_all', 'budgets', 'manage', 'any'); Compatibility Layer # Old API still works during transition: $patron->has_permission({ borrowers => 'edit_borrowers' }) # Internally translates to: $patron->has_permission('patrons', 'update', 'own_library') -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org