upgradePermissions() addresses a superset of cases handled by uninstallPermissions().
return FALSE;
}
- /**
- * Remove all vestiges of permissions for the given module.
- */
- function uninstallPermissions($module) {
- throw new CRM_Core_Exception("Unimplemented method: CRM_Core_Permission_*::uninstallPermissions");
- }
-
/**
* Ensure that the CMS supports all the permissions defined by CiviCRM
* and its extensions. If there are stale permissions, they should be
return TRUE;
}
- /**
- * Remove all vestiges of permissions for the given module.
- */
- function uninstallPermissions($module) {
- db_delete('role_permission')
- ->condition('permission', "$module|%", 'LIKE')
- ->condition('module', 'civicrm')
- ->execute();
- }
-
/**
* {@inheritdoc}
*/
return TRUE;
}
- /**
- * Remove all vestiges of permissions for the given module.
- *
- * Does nothing in Drupal 6.
- */
- function uninstallPermissions($module) {
- // D6 allows us to be really lazy... things get cleaned up when the admin form is next submitted...
- }
-
/**
* {@inheritdoc}
*
}
public function onPostUninstall(CRM_Extension_Info $info) {
- // Remove references to the module's permissions.
- $config = CRM_Core_Config::singleton();
- if ($config->userPermissionClass->isModulePermissionSupported()) {
- $config->userPermissionClass->uninstallPermissions($info->file);
- } // else: don't care because no permissions were installed!
}
public function onPreDisable(CRM_Extension_Info $info) {