1. Confirmed that a Ran the `validate-role exists with `descendant_open_voiced` in my local environment-permissions.js` script to confirm the success of the migration.
Before running the migration:
```
{F837289}yarn run v1.22.19
2$ . Confirmed that the `memberships` column reflects this bash/source-nvm.sh && NODE_ENV=development node --loader=./loader.mjs dist/scripts/validate-role-permissions.js
{F837290}(node:42854) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
3. Confirmed the user with this role was able(Use `node --trace-warnings ...` to see both a chat input bar and a join chat buttonhow where the warning was created)
{F837319}====================================
4.Validating: Role Name (Members) | Role ID (92379) | Thread Type (8) | Thread ID (92378)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, Ran the migrationsbaseExpectedPermissionBlob) = {}
====================================
{F837291}Validating: Role Name (Admins) | Role ID (92380) | Thread Type (8) | Thread ID (92378)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
5.Validating: Role Name (Members) | Role ID (92406) | Thread Type (8) | Thread ID (92405)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, Re-ran the same query from step 1 to confirm that the role no longer exitsbaseExpectedPermissionBlob) = {
{F837308} "descendant_open_voiced": true,
6. Re-ran the same query from step 2 to confirm that `memberships` was updated "join_thread": true,
{F837309} "descendant_react_to_message": true,
7. Confirmed the user with the affected role does not see both the chat input bar and the join chat button "descendant_edit_message": true,
{F837310} "descendant_add_members": true,
8. Re-set my DB version to `47` and ran the migrations again to make sure if it's run against a DB without any of these roles, the migrations will still succeed "descendant_edit_entries": true,
"descendant_edit_thread": true,
"descendant_edit_thread_description": true,
"descendant_edit_thread_color": true,
"descendant_toplevel_create_subthreads": true,
"descendant_edit_thread_avatar": true,
"descendant_toplevel_create_sidebars": true
}
Potential permission discrepancies for role Members that could be linked back to user surfaced permissions (i.e. not an actual discrepancy, but rather a user edited a role):
userSurfacedExistingPermissionsToExpectedPermissions = [
"edit_calendar",
"create_and_edit_channels",
"add_members",
"react_to_messages",
"edit_messages"
]
====================================
Validating: Role Name (Admins) | Role ID (92407) | Thread Type (8) | Thread ID (92405)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Members) | Role ID (92469) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {
"descendant_open_voiced": true,
"join_thread": true,
"descendant_react_to_message": true,
"descendant_edit_message": true,
"descendant_add_members": true
}
Potential permission discrepancies for role Members that could be linked back to user surfaced permissions (i.e. not an actual discrepancy, but rather a user edited a role):
userSurfacedExistingPermissionsToExpectedPermissions = [
"add_members",
"react_to_messages",
"edit_messages"
]
====================================
Validating: Role Name (Admins) | Role ID (92470) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Helpers) | Role ID (92495) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {
"manage_pins": true,
"descendant_manage_pins": true,
"react_to_message": true,
"descendant_react_to_message": true,
"edit_message": true,
"descendant_edit_message": true,
"manage_invite_links": true,
"descendant_manage_invite_links": true,
"change_role": true,
"descendant_change_role": true,
"edit_permissions": true,
"descendant_edit_permissions": true
}
Potential permission discrepancies for role Helpers that could be linked back to user surfaced permissions (i.e. not an actual discrepancy, but rather a user edited a role):
userSurfacedExistingPermissionsToExpectedPermissions = [
"change_roles",
"edit_visibility",
"manage_pins",
"react_to_messages",
"edit_messages",
"manage_invite_links"
]
====================================
✨ Done in 0.32s.
```
After running just migration #51:
```
yarn run v1.22.19
$ . bash/source-nvm.sh && NODE_ENV=development node --loader=./loader.mjs dist/scripts/validate-role-permissions.js
(node:46744) ExperimentalWarning: Custom ESM Loaders is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
====================================
Validating: Role Name (Members) | Role ID (92379) | Thread Type (8) | Thread ID (92378)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Admins) | Role ID (92380) | Thread Type (8) | Thread ID (92378)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Members) | Role ID (92406) | Thread Type (8) | Thread ID (92405)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Admins) | Role ID (92407) | Thread Type (8) | Thread ID (92405)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Members) | Role ID (92469) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Admins) | Role ID (92470) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {}
====================================
Validating: Role Name (Helpers) | Role ID (92495) | Thread Type (9) | Thread ID (92468)
deepDiff(baseExpectedPermissionBlob, existingRolePermissions) = {}
deepDiff(existingRolePermissions, baseExpectedPermissionBlob) = {
"manage_pins": true,
"react_to_message": true,
"edit_message": true,
"manage_invite_links": true,
"change_role": true,
"edit_permissions": true
}
Potential permission discrepancies for role Helpers that could be linked back to user surfaced permissions (i.e. not an actual discrepancy, but rather a user edited a role):
userSurfacedExistingPermissionsToExpectedPermissions = [
"change_roles",
"edit_visibility",
"manage_pins",
"react_to_messages",
"edit_messages",
"manage_invite_links"
]
====================================
✨ Done in 0.32s.
```