Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master #782

Merged
merged 65 commits into from
Mar 23, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
452e274
Handle eventally consistent blob lists in storage ITs
mziccard Mar 2, 2016
622dcc9
Replace values().iterator() with iterateAll() in blob list ITs
mziccard Mar 3, 2016
50750d4
Merge pull request #704 from mziccard/fix-storage-its
mziccard Mar 3, 2016
8dd8786
Remove redundant throws from services method signatures
mziccard Mar 4, 2016
7eb957d
Merge pull request #712 from mziccard/remove-throws
aozarov Mar 4, 2016
c486452
Add NoAuthCredentials
Mar 6, 2016
8c353ec
Add javadoc
Mar 7, 2016
0c4af89
change NoAuthCredentials javadoc wording
Mar 7, 2016
d3224b3
Merge pull request #719 from ajkannan/add-no-auth
ajkannan Mar 7, 2016
cded234
Fix writes with 0 length
aozarov Mar 7, 2016
36ebabd
Fix test and issue #723
aozarov Mar 8, 2016
e70387d
Merge pull request #725 from aozarov/master
mziccard Mar 8, 2016
d930b4b
Remove BlobListOption.recursive option and fix delimiter handling
mziccard Mar 8, 2016
0f4a7a0
Release version 0.1.5
mziccard Mar 8, 2016
2611514
Merge pull request #729 from mziccard/master
mziccard Mar 8, 2016
1f1f4b0
Updating version in README files. [ci skip]
Mar 8, 2016
aa6c173
Update version to 0.1.6-SNAPSHOT
mziccard Mar 8, 2016
7c42116
Merge pull request #730 from mziccard/master
aozarov Mar 8, 2016
de9b0d6
Refactor Storage's delimiter support
mziccard Mar 9, 2016
5dd3c30
Merge pull request #726 from mziccard/fix-list-prefix
mziccard Mar 9, 2016
407c436
Create service-specific spi packages
mziccard Mar 10, 2016
fd7d84d
Reorder and add imports
mziccard Mar 10, 2016
0d38c67
Merge pull request #742 from mziccard/rename-spi
ajkannan Mar 11, 2016
a595f6a
Use groups to separate packages in javadoc's index
mziccard Mar 10, 2016
90d0917
Add group for testing packages
mziccard Mar 10, 2016
24a712a
Rename Main packages to API packages, reorder groups, add service's SPIs
mziccard Mar 10, 2016
ac1ba66
Add more detailed javadoc to Blob and Storage signUrl
mziccard Mar 11, 2016
1425513
Merge pull request #738 from mziccard/javadoc-group-packages
ajkannan Mar 11, 2016
8a3b4f2
Remove final from Blob
jean-philippe-martin Mar 11, 2016
ddd02aa
Merge pull request #744 from jean-philippe-martin/blob_notfinal
aozarov Mar 11, 2016
ddb1ade
Rephrase signUrl javadoc for better clarity
mziccard Mar 13, 2016
d97c188
Rename maxResults to pageSize
mziccard Mar 14, 2016
86e23d5
Fix flaky RemoteGcsHelperTest.testForceDeleteTimeout
mziccard Mar 14, 2016
9e5c173
Merge pull request #745 from mziccard/rename-max-results
mderka Mar 14, 2016
646f3c9
Merge pull request #747 from mziccard/master
aozarov Mar 14, 2016
4e0248f
Add better javadoc for signUrl examples
mziccard Mar 15, 2016
3b083a6
Merge pull request #743 from mziccard/signurl-javadoc
mziccard Mar 15, 2016
c2c6628
Add get, replace, and test for IAM
Mar 1, 2016
7d48ec7
Merge pull request #718 from ajkannan/get-set-test-iam
ajkannan Mar 15, 2016
8ae8a1b
Create base class for serialization tests
mziccard Mar 16, 2016
967c5c5
Add tests for restorable classes. Fix serialization issues
mziccard Mar 17, 2016
034432a
Remove serialization test for ApplicationDefaultAuthCredentials
mziccard Mar 17, 2016
ce59793
Add restorableObjects method to BaseSerializationTest
mziccard Mar 17, 2016
0a113cd
Remove default contentType from Storage's compose
mziccard Mar 18, 2016
8840b33
Remove default contentType from Bucket's create
mziccard Mar 18, 2016
5c4e288
Make NoAuthCredentials constructor private
mziccard Mar 18, 2016
19e0c6e
Add IamPolicy to SerializationTest
mziccard Mar 18, 2016
83ddb08
Add equals and hashCode to exceptions. Add exceptions to serializatio…
mziccard Mar 18, 2016
353d2db
Merge pull request #754 from mziccard/serialization-tests
aozarov Mar 18, 2016
22636e2
Remove checks for contentType in CopyRequest
mziccard Mar 18, 2016
3e5db7a
Refactor CopyRequest: remove targetId, add boolean overrideInfo
mziccard Mar 20, 2016
1855ae1
Add better javadoc to Storage.copy and CopyWriter
mziccard Mar 20, 2016
5dd0292
Rephrase RewriteChannel and Storage.copy javadoc. Add final to CopyWr…
mziccard Mar 20, 2016
fa64fa5
Merge pull request #762 from mziccard/remove-compose-content-type
mziccard Mar 20, 2016
3e9e1a0
IAM docs and functional methods for policies
Mar 16, 2016
c05e738
Add binding entries as necessary in IamPolicy.Builder
Mar 21, 2016
7bbe67f
Take care of minor changes
Mar 21, 2016
5fbb41c
Merge pull request #760 from ajkannan/iam-docs-and-cleanup
ajkannan Mar 21, 2016
3a97ae1
Make role and permission strings to allow for service-specific values
Mar 22, 2016
52bf6c1
remove varargs for testPermissions and other minor fixes
Mar 22, 2016
a78f0a7
Merge pull request #772 from ajkannan/support-more-iam-roles
ajkannan Mar 22, 2016
b7c6da4
Rename startPageToken to pageToken in Storage and BigQuery
mziccard Mar 22, 2016
689bbb4
Merge pull request #774 from mziccard/rename-next-page-token
ajkannan Mar 22, 2016
d974887
Merge remote-tracking branch 'upstream/master' into dns-alpha
mderka Mar 23, 2016
e946b76
Updated the version in pom.
mderka Mar 23, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove varargs for testPermissions and other minor fixes
  • Loading branch information
Ajay Kannan committed Mar 22, 2016
commit 52bf6c1001716cd5f2145ff3be40631d542cd200
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Policy extends IamPolicy<String> {
/**
* The project-level roles in an IAM policy. This enum is not an exhaustive list of all roles
* you can use in an IAM policy. You can also use service-specific roles (e.g.
* <i>roles/pubsub.editor</i>). See the <i>Supported Cloud Platform Services</i> page for links
* "roles/pubsub.editor"). See the <i>Supported Cloud Platform Services</i> page for links
* to service-specific roles.
*
* @see <a href="https://cloud.google.com/iam/#supported_cloud_platform_services">Supported Cloud
Expand All @@ -74,7 +74,7 @@ public enum ProjectRole {
*/
OWNER("roles/owner");

String value;
private final String value;

private ProjectRole(String value) {
this.value = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,29 +251,6 @@ List<Boolean> testPermissions(List<String> permissions) {
return resourceManager.testPermissions(projectId(), permissions);
}

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

@Override
public Builder toBuilder() {
return new Builder(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,26 +341,4 @@ public static ProjectListOption fields(ProjectField... fields) {
* Services</a>
*/
List<Boolean> testPermissions(String projectId, List<String> permissions);

/**
* Returns the permissions that a caller has on the specified project. You typically don't call
* this method if you're using Google Cloud Platform directly to manage permissions. This method
* is intended for integration with your proprietary software, such as a customized graphical user
* interface. For example, the Cloud Platform Console tests IAM permissions internally to
* determine which UI should be available to the logged-in user. Each service that supports IAM
* lists the possible permissions; see the <i>Supported Cloud Platform services</i> page below for
* links to these lists.
*
* @return A list of booleans representing whether the caller has the permissions specified (in
* the order of the given permissions)
* @throws ResourceManagerException upon failure
* @see <a href=
* "https://cloud.google.com/resource-manager/reference/rest/v1beta1/projects/testIamPermissions">
* Resource Manager testIamPermissions</a>
* @see <a href=
* "https://cloud.google.com/iam/#supported_cloud_platform_services">Supported Cloud Platform
* Services</a>
*/
List<Boolean> testPermissions(
String projectId, String firstPermission, String... otherPermissions);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.gcloud.BaseService;
import com.google.gcloud.Page;
Expand Down Expand Up @@ -230,12 +229,6 @@ public List<Boolean> call() {
}
}

@Override
public List<Boolean> testPermissions(
String projectId, String firstPermission, String... otherPermissions) {
return testPermissions(projectId, Lists.asList(firstPermission, otherPermissions));
}

private Map<ResourceManagerRpc.Option, ?> optionMap(Option... options) {
Map<ResourceManagerRpc.Option, Object> temp = Maps.newEnumMap(ResourceManagerRpc.Option.class);
for (Option option : options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,11 @@ public void testTestPermissions() {
String getPermission = "resourcemanager.projects.get";
String deletePermission = "resourcemanager.projects.delete";
expect(resourceManager.options()).andReturn(mockOptions).times(1);
expect(resourceManager.testPermissions(PROJECT_ID, getPermission, deletePermission))
.andReturn(response);
expect(resourceManager.testPermissions(
PROJECT_ID, ImmutableList.of(getPermission, deletePermission)))
.andReturn(response);
replay(resourceManager);
initializeProject();
assertEquals(response, project.testPermissions(getPermission, deletePermission));
assertEquals(
response, project.testPermissions(ImmutableList.of(getPermission, deletePermission)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,6 @@ public void testTestPermissions() {
RESOURCE_MANAGER.create(PARTIAL_PROJECT);
assertEquals(ImmutableList.of(true),
RESOURCE_MANAGER.testPermissions(PARTIAL_PROJECT.projectId(), permissions));
assertEquals(
ImmutableList.of(true, true),
RESOURCE_MANAGER.testPermissions(
PARTIAL_PROJECT.projectId(),
"resourcemanager.projects.delete",
"resourcemanager.projects.get"));
}

@Test
Expand Down