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

[Bug]: Unauthorised Google Sheets data visible after app import #36747

Open
1 task done
shadabbuchh opened this issue Oct 8, 2024 · 1 comment · Fixed by #37006
Open
1 task done

[Bug]: Unauthorised Google Sheets data visible after app import #36747

shadabbuchh opened this issue Oct 8, 2024 · 1 comment · Fixed by #37006
Assignees
Labels
Bug Something isn't working Google Sheets Issues related to Google Sheets High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage Production Query & JS Pod Issues related to the query & JS Pod Query & Widgets Pod All issues related to Query, JS, Eval, and Widgets Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets

Comments

@shadabbuchh
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Description

  • While importing an app, when I authorise a specific sheet for the Google Sheets datasource and go to the app, I am able to view data from a sheet that was not selected during the authorisation process.

Steps To Reproduce

  1. Import this app: OldApp_DSTesting1.9.24 (1).json
  2. Authorise the Google sheet datasource & select any sheet.
  3. Click on Go to application.
  4. Now go to the page that runs a query form the above authorised datasource.

Expected: Data inside the selected sheet only should be visible upon binding the query with widgets.
Actual: We are able to see data from sheets that have not been selected.

Public Sample App

No response

Environment

Production

Severity

High (Blocker to building or releasing)

Issue video log

https://jam.dev/c/31e5e918-29d5-4d23-b99a-60c402d23e6b

Version

Cloud

@shadabbuchh shadabbuchh added Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Production Needs Triaging Needs attention from maintainers to triage Google Sheets Issues related to Google Sheets Import-Export-App Issues related to importing and exporting apps labels Oct 8, 2024
@github-actions github-actions bot added Integrations Product Issues related to a specific integration Artifact Platform Product Issues related to the application platform Git Platform Issues related to the git & the app platform Query & JS Pod Issues related to the query & JS Pod labels Oct 8, 2024
@infinitetrooper infinitetrooper removed Import-Export-App Issues related to importing and exporting apps Git Platform Issues related to the git & the app platform labels Oct 17, 2024
@github-actions github-actions bot removed the Artifact Platform Product Issues related to the application platform label Oct 17, 2024
@sneha122 sneha122 assigned sneha122 and unassigned rohan-arthur Oct 21, 2024
sneha122 added a commit that referenced this issue Oct 24, 2024
…37006)

## Description

This PR fixes the issue with google sheets -> selected sheets option.
Following are the steps to reproduce the issue on cloud/release
platform:

**Steps:**
1. Create a Google sheets datasource with selected sheets option
2. Select "spreadsheet1" from the file picker.
3. Create a query for this datasource and attach it to table widget
4. Now edit the datasource and change authorisation from "spreadsheet1"
to "spreadsheet2"
5. Refresh the page and check the table data

This issue has been fixed, where we check if the correct spreadsheetId
is present in authorisedSheetIds, if it's not throwing an exception so
we don't execute the query.


Fixes #36747   
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11473463879>
> Commit: e0f725a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11473463879&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 23 Oct 2024 05:43:59 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new error message for missing spreadsheet URLs to enhance
user guidance.
- Updated method for retrieving authorized sheet IDs to include
validation, improving error handling.

- **Bug Fixes**
- Enhanced error handling for cases where the spreadsheet URL is invalid
or missing.

- **Tests**
- Added new test cases to validate the updated functionality for
authorized sheet IDs, ensuring robust error handling and correct
returns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“[email protected]”>
@appsmith-bot appsmith-bot added the QA Needs QA attention label Oct 24, 2024
@github-actions github-actions bot added the QA Pod Issues under the QA Pod label Oct 24, 2024
github-actions bot pushed a commit to Zeral-Zhang/appsmith that referenced this issue Nov 20, 2024
…ppsmithorg#37006)

## Description

This PR fixes the issue with google sheets -> selected sheets option.
Following are the steps to reproduce the issue on cloud/release
platform:

**Steps:**
1. Create a Google sheets datasource with selected sheets option
2. Select "spreadsheet1" from the file picker.
3. Create a query for this datasource and attach it to table widget
4. Now edit the datasource and change authorisation from "spreadsheet1"
to "spreadsheet2"
5. Refresh the page and check the table data

This issue has been fixed, where we check if the correct spreadsheetId
is present in authorisedSheetIds, if it's not throwing an exception so
we don't execute the query.


Fixes appsmithorg#36747   
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11473463879>
> Commit: e0f725a
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11473463879&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 23 Oct 2024 05:43:59 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new error message for missing spreadsheet URLs to enhance
user guidance.
- Updated method for retrieving authorized sheet IDs to include
validation, improving error handling.

- **Bug Fixes**
- Enhanced error handling for cases where the spreadsheet URL is invalid
or missing.

- **Tests**
- Added new test cases to validate the updated functionality for
authorized sheet IDs, ensuring robust error handling and correct
returns.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: “sneha122” <“[email protected]”>
@shadabbuchh
Copy link
Contributor Author

Reopening this bug as column headers from unauthorized sheets are still visible. Please refer to the attached video for more details: https://jam.dev/c/dcbab043-dfff-40fe-aca4-a60fe0fd56ba

@shadabbuchh shadabbuchh reopened this Dec 26, 2024
@shadabbuchh shadabbuchh removed QA Needs QA attention QA Pod Issues under the QA Pod labels Dec 26, 2024
@carinanfonseca carinanfonseca added the Query & Widgets Pod All issues related to Query, JS, Eval, and Widgets label Jan 22, 2025
@github-actions github-actions bot added Widgets Product This label groups issues related to widgets Widgets & Accelerators Pod Issues related to widgets & Accelerators labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Google Sheets Issues related to Google Sheets High This issue blocks a user from building or impacts a lot of users Integrations Product Issues related to a specific integration Needs Triaging Needs attention from maintainers to triage Production Query & JS Pod Issues related to the query & JS Pod Query & Widgets Pod All issues related to Query, JS, Eval, and Widgets Widgets & Accelerators Pod Issues related to widgets & Accelerators Widgets Product This label groups issues related to widgets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants