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

add permission check for bulkCreate when overwrite #198

Merged

Conversation

raintygao
Copy link
Collaborator

Description

add permission check for bulkCreate when overwrite

Issues Resolved

Screenshot

Testing the changes

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@codecov-commenter
Copy link

codecov-commenter commented Sep 22, 2023

Codecov Report

Merging #198 (32eb7ee) into workspace (8505341) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           workspace     #198   +/-   ##
==========================================
  Coverage      66.21%   66.22%           
==========================================
  Files           3420     3420           
  Lines          65755    65755           
  Branches       10589    10589           
==========================================
+ Hits           43541    43543    +2     
+ Misses         19577    19570    -7     
- Partials        2637     2642    +5     
Flag Coverage Δ
Linux_1 30.42% <ø> (ø)
Linux_2 55.38% <ø> (ø)
Linux_3 42.76% <ø> (+<0.01%) ⬆️
Linux_4 34.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

if (options?.workspaces && options.workspaces.length > 0) {
const permitted = await this.validateMultiWorkspacesPermissions(
options.workspaces,
const isPassedWorkspaces = options?.workspaces && options.workspaces.length > 0;
Copy link
Owner

Choose a reason for hiding this comment

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

Nit: rename isPassedWorkspaces -> hasTargetWorkspaces

!(await this.validateMultiWorkspacesPermissions(
options.workspaces,
options.workspaces!,
Copy link
Owner

Choose a reason for hiding this comment

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

Let's avoid using non-null assertion, you could do options.workspaces ?? [] instead.

@raintygao raintygao force-pushed the feat-create-overwrite-permission branch from 6f09358 to 32eb7ee Compare October 9, 2023 09:52
@raintygao raintygao merged commit 5a26f70 into ruanyl:workspace Oct 10, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants