$perm_model->updateContentPermissionsForUserCollection($permissions, 'node', $dwInput['node_id'], 2, 0);
However, the permissions aren't being applied. So, the user groups still have their old permissions.
Looking at the updateContentPermissionsForUserCollection function, the permission cache is suppose to be rebuilt, which I would imagine also applies the changes. But that isn't happening unless I manually save the permissions again in the Admin area.
Am I missing something obvious again?