Skip to content

utils: update npm.config condition check in error-handler.js#108

Merged
zkat merged 1 commit intonpm:release-nextfrom
BeniCheni:error-handler-patch
Dec 10, 2018
Merged

utils: update npm.config condition check in error-handler.js#108
zkat merged 1 commit intonpm:release-nextfrom
BeniCheni:error-handler-patch

Conversation

@BeniCheni
Copy link
Copy Markdown
Contributor

Refs this topic on npm.community, this PR updates npm.config condition check in error-handler.js based on the suggestion from post #2.

@BeniCheni BeniCheni requested a review from a team as a code owner December 5, 2018 04:54
@zkat zkat added the semver:patch semver patch level for changes label Dec 6, 2018
Copy link
Copy Markdown
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

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

👍

@zkat zkat merged commit 90e55a1 into npm:release-next Dec 10, 2018
@BeniCheni BeniCheni deleted the error-handler-patch branch December 11, 2018 04:18
Jah-yee pushed a commit to Jah-yee/cli that referenced this pull request Apr 16, 2026
* fix: filter alertcenter scopes from user OAuth login flow

The `apps.alerts` scope is restricted to service accounts with
domain-wide delegation and fails with `400 invalid_scope` when
used in the standard 3-legged OAuth consent flow. Filter it out
alongside the existing chat.app/chat.bot/keep exclusions.

Fixes npm#73

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: also filter apps.alerts in is_app_only_scope()

The scope filter exists in two locations: setup.rs (fetch_scopes_for_apis)
and auth_commands.rs (is_app_only_scope). Both need the apps.alerts
exclusion to prevent it from appearing in the interactive scope picker.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: retrigger CLA check

* chore: retrigger CI after CLA signing

---------

Co-authored-by: Andrew Barnes <andrew.jaguars@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Jah-yee pushed a commit to Jah-yee/cli that referenced this pull request Apr 16, 2026
…#119) (npm#127)

Admin-only scopes (apps.*, cloud-identity.*, ediscovery, directory.readonly,
groups) require Workspace domain-admin access and cannot be granted to personal
@gmail.com accounts — Google returns 400 invalid_scope when they're included.

Changes:
- Add is_workspace_admin_scope() helper (mirrors is_app_only_scope())
  to identify scopes that fail for personal Google accounts
- Exclude these scopes from the template_selects of the 'Recommended' preset
  in run_discovery_scope_picker()
- Exclude them from the resolved scope list when the Recommended template
  is confirmed
- Add 8 unit tests covering the new helper

Workspace admins can still access these scopes via 'Full Access' template
or by selecting them individually in the picker.

Note: this is complementary to PR npm#108 which filters alertcenter scopes
at the API-discovery level. This PR handles the broader set at the
recommendation layer.

Addresses npm#119 (Bug 1: admin scopes in Recommended preset)

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:patch semver patch level for changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants