Skip to content

Commit d159063

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 4167 b: refs/heads/gcs-nio c: 52bf6c1 h: refs/heads/master i: 4165: a8f7333 4163: 559e305 4159: 25f376b
1 parent d80d76f commit d159063

7 files changed

Lines changed: 3 additions & 64 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ refs/tags/v0.0.12: 2fd8066e891fb3dfea69b65f6bf6461db79342b9
1111
refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
14-
refs/heads/gcs-nio: 3a97ae10587c21d34cf495447a3f9c3e9b9093da
14+
refs/heads/gcs-nio: 52bf6c1001716cd5f2145ff3be40631d542cd200
1515
refs/heads/logging-alpha: db5312bffa7fccac194f6a7feb8cc3066de16aff
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0

branches/gcs-nio/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Policy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class Policy extends IamPolicy<String> {
4747
/**
4848
* The project-level roles in an IAM policy. This enum is not an exhaustive list of all roles
4949
* you can use in an IAM policy. You can also use service-specific roles (e.g.
50-
* <i>roles/pubsub.editor</i>). See the <i>Supported Cloud Platform Services</i> page for links
50+
* "roles/pubsub.editor"). See the <i>Supported Cloud Platform Services</i> page for links
5151
* to service-specific roles.
5252
*
5353
* @see <a href="https://cloud.google.com/iam/#supported_cloud_platform_services">Supported Cloud
@@ -74,7 +74,7 @@ public enum ProjectRole {
7474
*/
7575
OWNER("roles/owner");
7676

77-
String value;
77+
private final String value;
7878

7979
private ProjectRole(String value) {
8080
this.value = value;

branches/gcs-nio/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/Project.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -251,29 +251,6 @@ List<Boolean> testPermissions(List<String> permissions) {
251251
return resourceManager.testPermissions(projectId(), permissions);
252252
}
253253

254-
/**
255-
* Returns the permissions that a caller has on this project. You typically don't call this method
256-
* if you're using Google Cloud Platform directly to manage permissions. This method is intended
257-
* for integration with your proprietary software, such as a customized graphical user interface.
258-
* For example, the Cloud Platform Console tests IAM permissions internally to determine which UI
259-
* should be available to the logged-in user. Each service that supports IAM lists the possible
260-
* permissions; see the <i>Supported Cloud Platform services</i> page below for links to these
261-
* lists.
262-
*
263-
* @return a list of booleans representing whether the caller has the permissions specified (in
264-
* the order of the given permissions)
265-
* @throws ResourceManagerException upon failure
266-
* @see <a href=
267-
* "https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects/testIamPermissions">
268-
* Resource Manager testIamPermissions</a>
269-
* @see <a href=
270-
* "https://cloud.google.com/iam/#supported_cloud_platform_services">Supported Cloud Platform
271-
* Services</a>
272-
*/
273-
List<Boolean> testPermissions(String firstPermission, String... otherPermissions) {
274-
return resourceManager.testPermissions(projectId(), firstPermission, otherPermissions);
275-
}
276-
277254
@Override
278255
public Builder toBuilder() {
279256
return new Builder(this);

branches/gcs-nio/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManager.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -341,26 +341,4 @@ public static ProjectListOption fields(ProjectField... fields) {
341341
* Services</a>
342342
*/
343343
List<Boolean> testPermissions(String projectId, List<String> permissions);
344-
345-
/**
346-
* Returns the permissions that a caller has on the specified project. You typically don't call
347-
* this method if you're using Google Cloud Platform directly to manage permissions. This method
348-
* is intended for integration with your proprietary software, such as a customized graphical user
349-
* interface. For example, the Cloud Platform Console tests IAM permissions internally to
350-
* determine which UI should be available to the logged-in user. Each service that supports IAM
351-
* lists the possible permissions; see the <i>Supported Cloud Platform services</i> page below for
352-
* links to these lists.
353-
*
354-
* @return A list of booleans representing whether the caller has the permissions specified (in
355-
* the order of the given permissions)
356-
* @throws ResourceManagerException upon failure
357-
* @see <a href=
358-
* "https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects/testIamPermissions">
359-
* Resource Manager testIamPermissions</a>
360-
* @see <a href=
361-
* "https://cloud.google.com/iam/#supported_cloud_platform_services">Supported Cloud Platform
362-
* Services</a>
363-
*/
364-
List<Boolean> testPermissions(
365-
String projectId, String firstPermission, String... otherPermissions);
366344
}

branches/gcs-nio/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceManagerImpl.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import com.google.common.collect.ImmutableList;
2424
import com.google.common.collect.ImmutableMap;
2525
import com.google.common.collect.Iterables;
26-
import com.google.common.collect.Lists;
2726
import com.google.common.collect.Maps;
2827
import com.google.gcloud.BaseService;
2928
import com.google.gcloud.Page;
@@ -230,12 +229,6 @@ public List<Boolean> call() {
230229
}
231230
}
232231

233-
@Override
234-
public List<Boolean> testPermissions(
235-
String projectId, String firstPermission, String... otherPermissions) {
236-
return testPermissions(projectId, Lists.asList(firstPermission, otherPermissions));
237-
}
238-
239232
private Map<ResourceManagerRpc.Option, ?> optionMap(Option... options) {
240233
Map<ResourceManagerRpc.Option, Object> temp = Maps.newEnumMap(ResourceManagerRpc.Option.class);
241234
for (Option option : options) {

branches/gcs-nio/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/ProjectTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,14 +240,11 @@ public void testTestPermissions() {
240240
String getPermission = "resourcemanager.projects.get";
241241
String deletePermission = "resourcemanager.projects.delete";
242242
expect(resourceManager.options()).andReturn(mockOptions).times(1);
243-
expect(resourceManager.testPermissions(PROJECT_ID, getPermission, deletePermission))
244-
.andReturn(response);
245243
expect(resourceManager.testPermissions(
246244
PROJECT_ID, ImmutableList.of(getPermission, deletePermission)))
247245
.andReturn(response);
248246
replay(resourceManager);
249247
initializeProject();
250-
assertEquals(response, project.testPermissions(getPermission, deletePermission));
251248
assertEquals(
252249
response, project.testPermissions(ImmutableList.of(getPermission, deletePermission)));
253250
}

branches/gcs-nio/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/ResourceManagerImplTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,6 @@ public void testTestPermissions() {
381381
RESOURCE_MANAGER.create(PARTIAL_PROJECT);
382382
assertEquals(ImmutableList.of(true),
383383
RESOURCE_MANAGER.testPermissions(PARTIAL_PROJECT.projectId(), permissions));
384-
assertEquals(
385-
ImmutableList.of(true, true),
386-
RESOURCE_MANAGER.testPermissions(
387-
PARTIAL_PROJECT.projectId(),
388-
"resourcemanager.projects.delete",
389-
"resourcemanager.projects.get"));
390384
}
391385

392386
@Test

0 commit comments

Comments
 (0)