summaryrefslogtreecommitdiffstats
path: root/controller-api
diff options
context:
space:
mode:
authortoby <smorgrav@yahoo-inc.com>2019-11-08 10:22:50 +0100
committertoby <smorgrav@yahoo-inc.com>2019-11-08 10:22:50 +0100
commit26a7636873b991f88147a89173a0df84d43fac89 (patch)
treec01225c71f384743d793231c8b663e5a81be228a /controller-api
parentaefd579cf74faf45d4279071daff6f2401597514 (diff)
Rename remove add methods to differentiate it to roles crud operations
Diffstat (limited to 'controller-api')
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockUserManagement.java4
-rw-r--r--controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/user/UserManagement.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockUserManagement.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockUserManagement.java
index cdec8e60072..ee7337b524d 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockUserManagement.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockUserManagement.java
@@ -43,7 +43,7 @@ public class MockUserManagement implements UserManagement {
}
@Override
- public void addRoles(UserId user, Collection<Role> roles) {
+ public void addToRoles(UserId user, Collection<Role> roles) {
for (Role role : roles) {
addUsers(role, Collections.singletonList(user));
}
@@ -55,7 +55,7 @@ public class MockUserManagement implements UserManagement {
}
@Override
- public void removeRoles(UserId user, Collection<Role> roles) {
+ public void removeFromRoles(UserId user, Collection<Role> roles) {
for (Role role : roles) {
removeUsers(role, Collections.singletonList(user));
}
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/user/UserManagement.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/user/UserManagement.java
index ee3c48e85d3..922f0f11244 100644
--- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/user/UserManagement.java
+++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/user/UserManagement.java
@@ -22,13 +22,13 @@ public interface UserManagement {
void addUsers(Role role, Collection<UserId> users);
/** Ensures the given user exist, and are part of the given roles, or throws if the roles does not exist. */
- void addRoles(UserId user, Collection<Role> roles);
+ void addToRoles(UserId user, Collection<Role> roles);
/** Ensures none of the given users are part of the given role, or throws if the role does not exist. */
void removeUsers(Role role, Collection<UserId> users);
/** Ensures the given users are not part of the given role, or throws if the roles does not exist. */
- void removeRoles(UserId user, Collection<Role> roles);
+ void removeFromRoles(UserId user, Collection<Role> roles);
/** Returns all users in the given role, or throws if the role does not exist. */
List<User> listUsers(Role role);