function drush_policy_updatedb_validate

8.0.x drush_policy_updatedb_validate()
6.x drush_policy_updatedb_validate()
7.x drush_policy_updatedb_validate()
4.x drush_policy_updatedb_validate()
5.x drush_policy_updatedb_validate()

Implements drush_hook_COMMAND_validate().

To test this example without copying, execute `drush --include=./examples updatedb` from within your drush directory.

Unauthorized users may view pending updates but not execute them.


examples/, line 95
Example policy commandfile. Modify as desired.


function drush_policy_updatedb_validate() {
  // Check for a token in the request. In this case, we require --token=secret.
  if (!drush_get_option('token') == 'secret') {
    drush_log(dt('Per site policy, you must add a secret --token complete this command. See examples/  If you are running a version of drush prior to 4.3 and are not sure why you are seeing this message, please see'), 'warning');
    drush_set_context('DRUSH_AFFIRMATIVE', FALSE);
    drush_set_context('DRUSH_NEGATIVE', TRUE);