You are here

function pm_permission_migrate_enable_permissions in Drupal PM (Project Management) 8

Same name and namespace in other branches
  1. 7.3 includes/pm.permission.migrate.inc \pm_permission_migrate_enable_permissions()

Sets site variables to tell pmpermission to handle submodule's permissions.

1 call to pm_permission_migrate_enable_permissions()
pm_permission_migrate_execute in includes/pm.permission.migrate.inc
Helper function to migrate permission defined by submodules.

File

includes/pm.permission.migrate.inc, line 180
Migration functions for the PM Permission module.

Code

function pm_permission_migrate_enable_permissions($type) {
  switch ($type) {
    case 'pmteam':
    case 'pmorganization':
    case 'pmproject':
    case 'pmtask':
    case 'pmticket':
    case 'pmtimetracking':
    case 'pmnote':
    case 'pminvoice':
    case 'pmexpense':
      variable_set("pm_permission_node_{$type}_enabled", TRUE);
      break;
    default:
      break;
  }
}