GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add IAM samples by ace-n · Pull Request #359 · GoogleCloudPlatform/nodejs-docs-samples

Conversation

@ace-n

@ace-n ace-n commented Apr 25, 2017

Copy link
Copy Markdown
Contributor

@frankyn a few (nitpicky) questions for you:

  • Should we be calling our sample methods/region tags [view/add/remove]BucketIamRole instead of [view/add/remove]BucketIamMembers?
  • Do we need to explicitly specify project ID? The canonical Ruby IAM sample specifies it, but only some of the Node.js storage ones do. (Perhaps @jmdobry can chime in too?)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Ace Nassri
Add IAM samples
50ef5d0
@ace-n
ace-n requested a review from jmdobry April 25, 2017 00:16
Ace Nassri
Nit: fix tense in comments
d442bed
@jmdobry jmdobry assigned ace-n Apr 25, 2017
jmdobry
jmdobry requested changes Apr 25, 2017
View reviewed changes
Comment thread storage/iam.js Outdated
// const roleName = "roles/storage.objectViewer";

// The list of IAM members to grant the role to
// const members = ['user:[email protected]', 'group:[email protected]'];

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's some extra indentation on this line

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/iam.js Outdated
function viewBucketIamMembers (bucketName) {
// [START view_bucket_iam_members]

// Your Google Cloud Storage bucket name

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable definitions (everything really) should be below any import statements.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/iam.js Outdated

function viewBucketIamMembers (bucketName) {
// [START view_bucket_iam_members]

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's an extra blank line here

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/iam.js
function addBucketIamMember (bucketName, roleName, members) {
// [START add_bucket_iam_member]
// Your Google Cloud Storage bucket name
// const bucketName = "my-bucket";

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable definitions (everything really) should be below any import statements

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/iam.js
function removeBucketIamMember (bucketName, roleName, members) {
// [START remove_bucket_iam_member]
// Your Google Cloud Storage bucket name
// const bucketName = "my-bucket";

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable definitions (everything really) should be below any import statements

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/iam.js Outdated
.help();

if (module === require.main) {
cli.help().strict().argv; // eslint-disable-line

@jmdobry jmdobry Apr 25, 2017

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you're right, perhaps we should make this the standard (a "main" function).

Change to:

  .epilogue(`For more information, see https://cloud.google.com/iam/docs/overview and https://cloud.google.com/storage/docs`)
  .help()
  .strict();

if (module === require.main) {
  cli.parse(process.argv.slice(2));
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Ace Nassri added 2 commits April 25, 2017 13:07
Ace Nassri
Address comments
fcb9edc
Ace Nassri
Merge branch 'master' into bkt-iam
1c94917
@codecov-io

codecov-io commented Apr 25, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

Merging #359 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #359   +/-   ##
=======================================
  Coverage   83.88%   83.88%           
=======================================
  Files           4        4           
  Lines         422      422           
=======================================
  Hits          354      354           
  Misses         68       68

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 70fc057...1c94917. Read the comment docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jmdobry
jmdobry approved these changes Apr 25, 2017
View reviewed changes
@frankyn

frankyn commented Apr 25, 2017 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Hi Ace,

To answer each of your questions:

Should we be calling our sample methods/region tags [view/add/remove]BucketIamRole instead of [view/add/remove]BucketIamMembers?

Keep BucketIamMembers as it makes more sense with the documentation that's being released. I'll send you additional information through chat.

Do we need to explicitly specify project ID? The canonical Ruby IAM sample specifies it, but only some of the Node.js storage ones do. (Perhaps @jmdobry can chime in too?)

I did it for Ruby because it's used more often. This falls into a per-language bias.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ace-n
ace-n merged commit 2109860 into master Apr 25, 2017
@ace-n
ace-n deleted the bkt-iam branch April 25, 2017 21:48
@snyk-bot snyk-bot mentioned this pull request Feb 1, 2020
[Snyk] Fix for 1 vulnerabilities enterstudio/nodejs-docs-samples#219
Open
grayside pushed a commit that referenced this pull request Oct 26, 2022
@release-please
chore: release 1.8.0 (#359)
f470a95
@grayside grayside mentioned this pull request Oct 26, 2022
migrate code from googleapis/nodejs-tasks #2792
Merged
grayside pushed a commit that referenced this pull request Nov 3, 2022
@release-please @grayside
chore: release 1.8.0 (#359)
d993b55
ace-n pushed a commit that referenced this pull request Nov 14, 2022
@release-please
chore: release 2.2.1 (#359)
2b30a5c
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@ace-n ace-n mentioned this pull request Nov 14, 2022
migrate code from googleapis/nodejs-scheduler #2848
Closed
ace-n pushed a commit that referenced this pull request Nov 14, 2022
@release-please
chore: release 2.2.1 (#359)
5916bcf
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
@ace-n ace-n mentioned this pull request Nov 14, 2022
migrate code from googleapis/nodejs-scheduler #2849
Merged
ace-n pushed a commit that referenced this pull request Nov 14, 2022
@release-please Ace Nassri
chore: release 2.2.1 (#359)
df9a58e
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 15, 2022
@release-please Ace Nassri
chore: release 2.2.1 (#359)
a343091
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 16, 2022
@release-please
chore: release 2.6.5 (#359)
0a0ad1d
@ace-n ace-n mentioned this pull request Nov 16, 2022
migrate code from googleapis/nodejs-video-intelligence #2855
Merged
grayside pushed a commit that referenced this pull request Nov 16, 2022
@release-please
chore: release 2.1.1 (#359)
4f14490
🤖 I have created a release \*beep\* \*boop\* 
---
### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09)


### Bug Fixes

* typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
This was referenced Nov 16, 2022
migrate code from googleapis/nodejs-cloud-container #2859
Closed
migrate code from googleapis/nodejs-cloud-container #2860
Merged
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore: release 2.6.5 (#359)
58c1cff
ace-n pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ace Nassri
chore: release 2.1.1 (#359)
2ebafbf
🤖 I have created a release \*beep\* \*boop\* 
---
### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09)


### Bug Fixes

* typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
grayside pushed a commit that referenced this pull request Nov 17, 2022
@release-please @grayside
chore: release 2.1.1 (#359)
63d0a71
🤖 I have created a release \*beep\* \*boop\* 
---
### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09)


### Bug Fixes

* typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
unforced pushed a commit that referenced this pull request Nov 17, 2022
Anthony Benjamin E. Coe @sofisl
docs: remove unused region tags (#359)
8062d54
* fix unmatched region tag

* fix lint

* fix bad copy paste

* fix another bad copy paste

* add new region tags to different demos

* update new tags to match most-used tag from other langs

* docs: remove unused region tags

Co-authored-by: Benjamin E. Coe <[email protected]>
Co-authored-by: sofisl <[email protected]>
@unforced unforced mentioned this pull request Nov 17, 2022
migrate code from googleapis/nodejs-security-center #2867
Merged
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ahrar Monsur
chore: release 2.6.5 (#359)
20ce848
ahrarmonsur pushed a commit that referenced this pull request Nov 17, 2022
@release-please Ahrar Monsur
chore: release 2.1.1 (#359)
2df59bc
🤖 I have created a release \*beep\* \*boop\* 
---
### [2.1.1](https://www.github.com/googleapis/nodejs-cloud-container/compare/v2.1.0...v2.1.1) (2020-07-09)


### Bug Fixes

* typeo in nodejs .gitattribute ([#358](https://www.github.com/googleapis/nodejs-cloud-container/issues/358)) ([8d4b79a](https://www.github.com/googleapis/nodejs-cloud-container/commit/8d4b79aa731f06e7c31e86ec3f8d0190554f40be))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Shabirmean pushed a commit that referenced this pull request Feb 16, 2023
@release-please Benjamin E. Coe
chore: release 1.7.0 (#359)
c867289
@Shabirmean Shabirmean mentioned this pull request Feb 16, 2023
samples: migrate code from googleapis/nodejs-dlp #3035
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jmdobry jmdobry jmdobry approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@ace-n ace-n

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@ace-n @codecov-io @frankyn @jmdobry
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.