Skip to content

Commit

Permalink
Rename Hive access control 'none' to 'allow-all'
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Oct 22, 2015
1 parent b1b220d commit 30a4696
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import java.util.Map;

import static com.facebook.presto.hive.ConditionalModule.installModuleIf;
import static com.facebook.presto.hive.SecurityConfig.ALLOW_ALL_ACCESS_CONTROL;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
import static java.util.Objects.requireNonNull;
Expand Down Expand Up @@ -95,7 +96,7 @@ public Connector create(String connectorId, Map<String, String> config)
new HiveClientModule(connectorId, metastore, typeManager, pageIndexerFactory),
installModuleIf(
SecurityConfig.class,
security -> "none".equalsIgnoreCase(security.getSecuritySystem()),
security -> ALLOW_ALL_ACCESS_CONTROL.equalsIgnoreCase(security.getSecuritySystem()),
new NoSecurityModule()),
installModuleIf(
SecurityConfig.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

public class SecurityConfig
{
private String securitySystem = "none";
public static final String ALLOW_ALL_ACCESS_CONTROL = "allow-all";

private String securitySystem = ALLOW_ALL_ACCESS_CONTROL;

public String getSecuritySystem()
{
Expand Down

0 comments on commit 30a4696

Please sign in to comment.