non-existing permissions are imported with SQL error, never removed

Created on 6 June 2017, over 7 years ago
Updated 8 December 2023, 12 months ago

Problem/Motivation

If a permissions is exported to the master feature, it can be imported on a database/codebase where this permission is not valid (eg: module does not exist, node type does not exist.). It will be imported to the "role_permission" table. Import (revert) will fail with an error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null'
After the import, the permission will not be removed when exporting (update) the master feature. Only the "$roles" array will be emptied.

Proposed resolution

add extra check before executing user_role_change_permissions?

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇳🇱Netherlands keesje

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024