diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-04-04 12:57:44 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-04-05 14:49:01 +0200 |
commit | d6cabc38ba3255663184b15eacb5bf9903c42c98 (patch) | |
tree | e70bf90f885ea0ad652585a1051379d798380755 /controller-api | |
parent | 6f09313fee87eb4eccd4c230b77d2786144ad883 (diff) |
Refactor tenant
* Split tenant types into separate classes
* Stop using TenantId internally in controller-server
* Test variations of invalid tenant names and normalization
Diffstat (limited to 'controller-api')
2 files changed, 0 insertions, 9 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java index 2fd75e25498..2067a88e5fb 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/Identifier.java @@ -99,9 +99,5 @@ public abstract class Identifier { throw new IllegalArgumentException(String.format("Invalid id: %s. %s", id, explanation)); } - public static void throwInvalidId(String id, String explanation, String idName) { - throw new IllegalArgumentException(String.format("Invalid %s id: %s. %s", idName, id, explanation)); - } - } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/TenantId.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/TenantId.java index 2c619fb58ef..4974192e213 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/TenantId.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/identifiers/TenantId.java @@ -26,9 +26,4 @@ public class TenantId extends NonDefaultIdentifier { } } - /** Return true if this is the user tenant of the given user */ - public boolean isTenantFor(UserId userId) { - return id().equals("by-" + userId.id().replace('_', '-')); - } - } |