You are here

function media_update_7226 in D7 Media 7.4

Same name and namespace in other branches
  1. 7.2 media.install \media_update_7226()
  2. 7.3 media.install \media_update_7226()

Grant existing user access to new media browser permission.

File

./media.install, line 1221
Install, update and uninstall functions for the Media module.

Code

function media_update_7226() {
  $roles = user_roles(FALSE, 'create files');
  foreach ($roles as $rid => $role) {
    user_role_grant_permissions($rid, array(
      'access media browser',
    ));
  }
}