Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Add command option for whether to require auth credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Mar 24, 2015
1 parent 0283f1f commit d697687
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 0 deletions.
Expand Up @@ -58,4 +58,11 @@ public interface ConfigurableOptions extends BasicOptions {

public
void setDisableSSLCert(boolean disableSSLCert);

/**
* Use to disable check for presence of username and API key before running command.
*
* @return true if this command should fail when username or API key is absent.
*/
public boolean isAuthRequired();
}
Expand Up @@ -137,4 +137,9 @@ void setDisableSSLCert(boolean disableSSLCert) {
this.disableSSLCert = disableSSLCert;
}

@Override
public boolean isAuthRequired() {
// auth should be required for most commands
return true;
}
}
Expand Up @@ -17,4 +17,8 @@ public String getCommandDescription() {
return "Lists all remote documents in the configured server/project/version.";
}

@Override
public boolean isAuthRequired() {
return false;
}
}
Expand Up @@ -73,4 +73,8 @@ public void setExportPot(boolean exportPot) {
this.exportPot = exportPot;
}

@Override
public boolean isAuthRequired() {
return false;
}
}
Expand Up @@ -164,4 +164,9 @@ void setContinueAfterError(boolean continueAfterError) {
public boolean isContinueAfterError() {
return continueAfterError;
}

@Override
public boolean isAuthRequired() {
return false;
}
}
Expand Up @@ -112,4 +112,9 @@ public String getCommandName() {
public String getCommandDescription() {
return "Displays translation statistics for a Zanata project version.";
}

@Override
public boolean isAuthRequired() {
return false;
}
}

0 comments on commit d697687

Please sign in to comment.