You are here

private_files_download_permission.install in Private files download permission 7

Same filename and directory in other branches
  1. 7.2 private_files_download_permission.install

Installs, updates and uninstalls module variables and settings.

Copyright (c) 2011-2012 by Marco Zanon (http://www.marcozanon.com) Released under GPLv2 license Idea and code inspired by http://www.beacon9.ca/labs/drupal-7-private-files-module

File

private_files_download_permission.install
View source
<?php

/**
 * @file
 * Installs, updates and uninstalls module variables and settings.
 *
 * Copyright (c) 2011-2012 by Marco Zanon (http://www.marcozanon.com)
 * Released under GPLv2 license
 * Idea and code inspired by http://www.beacon9.ca/labs/drupal-7-private-files-module
 */

/**
 * Implements hook_disable().
 */
function private_files_download_permission_disable() {
  foreach (user_roles() as $rid => $role_name) {
    user_role_revoke_permissions($rid, array(
      'download private files',
      'administer private files download permission',
    ));
  }
}

/**
 * Implements hook_uninstall().
 */
function private_files_download_permission_uninstall() {
  variable_del('private_files_download_permission_unprotected_subfolder');
}