You are here

function media_wysiwyg_update_7201 in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 modules/media_wysiwyg/media_wysiwyg.install \media_wysiwyg_update_7201()
  2. 7.3 modules/media_wysiwyg/media_wysiwyg.install \media_wysiwyg_update_7201()

Grant existing user access to new media wysiwyg permission.

File

modules/media_wysiwyg/media_wysiwyg.install, line 130
Install, update and uninstall functions for the Media WYSIWYG module.

Code

function media_wysiwyg_update_7201() {
  $roles = user_roles(TRUE, 'access media browser');
  foreach ($roles as $rid => $role) {
    user_role_grant_permissions($rid, array(
      'use media wysiwyg',
    ));
  }
  return t('Use Media WYSIWYG permission was granted to: @roles.', array(
    '@roles' => check_plain(implode(', ', $roles)),
  ));
}