fix: removed gsheet feature flag (#22758)

## Description

This PR removed google sheet feature flag, so that all new
functionalities are available to all users

Note: **We should test this PR only after all google sheet related PRs
have been merged**

> Add a TL;DR when description is extra long (helps content team)

Fixes #22478 


Media
> A video or a GIF is preferred. when using Loom, don’t embed because it
looks like it’s a GIF. instead, just link to the video


## Type of change

- New feature (non-breaking change which adds functionality)


## How Has This Been Tested?

- Manual

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

Co-authored-by: “sneha122” <“sneha@appsmith.com”>
This commit is contained in:
sneha122 2023-05-05 20:38:04 +05:30 committed by GitHub
parent fadf712833
commit a03cadcde7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 85 deletions

View File

@ -14,7 +14,6 @@
"AUDIT_LOGS": true,
"JS_EDITOR": true,
"GIT_IMPORT": true,
"CONTEXT_SWITCHING": true,
"LIMITING_GOOGLE_SHEET_ACCESS": true
"CONTEXT_SWITCHING": true
}
}

View File

@ -10,7 +10,6 @@ type FeatureFlags = {
DATASOURCE_ENVIRONMENTS?: boolean;
MULTIPLE_PANES?: boolean;
AUTO_LAYOUT?: boolean;
LIMITING_GOOGLE_SHEET_ACCESS?: boolean;
LAZY_CANVAS_RENDERING?: boolean;
ONE_CLICK_BINDING?: boolean;
CHAT_AI?: boolean;

View File

@ -64,7 +64,6 @@ import {
GSHEET_AUTHORIZATION_ERROR,
SAVE_AND_AUTHORIZE_BUTTON_TEXT,
} from "@appsmith/constants/messages";
import { selectFeatureFlags } from "selectors/usersSelectors";
import { getDatasourceErrorMessage } from "./errorUtils";
import { getAssetUrl } from "@appsmith/utils/airgapHelpers";
import { DocumentationLink } from "../QueryEditor/EditorJSONtoForm";
@ -278,7 +277,6 @@ class DatasourceSaaSEditor extends JSONtoForm<Props, State> {
datasourceButtonConfiguration,
datasourceId,
documentationLink,
featureFlags,
formConfig,
formData,
gsheetProjectID,
@ -381,9 +379,7 @@ class DatasourceSaaSEditor extends JSONtoForm<Props, State> {
<>
{/* This adds information banner when creating google sheets datasource,
this info banner explains why appsmith requires permissions from users google account */}
{!!featureFlags &&
!!featureFlags?.LIMITING_GOOGLE_SHEET_ACCESS &&
datasource &&
{datasource &&
isGoogleSheetPlugin &&
datasource?.id === TEMP_DATASOURCE_ID ? (
<AuthMessage
@ -558,7 +554,6 @@ const mapStateToProps = (state: AppState, props: any) => {
state.entities.datasources.isDatasourceBeingSavedFromPopup,
isFormDirty,
canCreateDatasourceActions,
featureFlags: selectFeatureFlags(state),
gsheetToken,
gsheetProjectID,
};

View File

@ -2,59 +2,6 @@
"form": [
{
"sectionName": "General",
"hidden": {
"comparison": "FEATURE_FLAG",
"value": true,
"flagValue": "LIMITING_GOOGLE_SHEET_ACCESS"
},
"children": [
{
"label": "Authentication Type",
"configProperty": "datasourceConfiguration.authentication.authenticationType",
"controlType": "INPUT_TEXT",
"isRequired": false,
"hidden": true,
"initialValue": "oAuth2"
},
{
"label": "Grant Type",
"configProperty": "datasourceConfiguration.authentication.grantType",
"controlType": "INPUT_TEXT",
"isRequired": false,
"hidden": true,
"initialValue": "authorization_code"
},
{
"label": "Scope",
"configProperty": "datasourceConfiguration.authentication.scopeString",
"controlType": "DROP_DOWN",
"isRequired": true,
"options": [
{
"label": "Read Files",
"value": "https://www.googleapis.com/auth/spreadsheets.readonly,https://www.googleapis.com/auth/drive.readonly"
},
{
"label": "Read, Edit and Create Files",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.readonly"
},
{
"label": "Read, Edit, Create and Delete Files",
"value": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive"
}
],
"initialValue": "https://www.googleapis.com/auth/spreadsheets,https://www.googleapis.com/auth/drive.readonly"
}
]
},
{
"sectionName": "General",
"hidden": {
"comparison": "FEATURE_FLAG",
"value": false,
"flagValue": "LIMITING_GOOGLE_SHEET_ACCESS"
},
"isDefaultOpen": true,
"children": [
{
"label": "Authentication Type",

View File

@ -32,7 +32,6 @@ public enum FeatureFlagEnum {
CONTEXT_SWITCHING,
DATASOURCE_ENVIRONMENTS,
AUTO_LAYOUT,
LIMITING_GOOGLE_SHEET_ACCESS,
LAZY_CANVAS_RENDERING,
ONE_CLICK_BINDING,

View File

@ -467,19 +467,11 @@ public class AuthenticationServiceCEImpl implements AuthenticationServiceCE {
Mono<String> accessTokenMono = Mono.just(accessToken);
Mono<String> projectIdMono = Mono.just(projectID);
return featureFlagService.check(FeatureFlagEnum.LIMITING_GOOGLE_SHEET_ACCESS)
.flatMap(isFeatureFlag -> {
if (Boolean.TRUE.equals(isFeatureFlag)) {
return pluginExecutorHelper
.getPluginExecutor(pluginService.findById(datasource.getPluginId()))
.flatMap(pluginExecutor -> ((PluginExecutor<Object>) pluginExecutor)
.getDatasourceMetadata(datasource.getDatasourceConfiguration()))
.then(Mono.zip(Mono.just(datasource), accessTokenMono, projectIdMono));
}
return Mono.zip(Mono.just(datasource), accessTokenMono, projectIdMono);
});
return pluginExecutorHelper
.getPluginExecutor(pluginService.findById(datasource.getPluginId()))
.flatMap(pluginExecutor -> ((PluginExecutor<Object>) pluginExecutor)
.getDatasourceMetadata(datasource.getDatasourceConfiguration()))
.then(Mono.zip(Mono.just(datasource), accessTokenMono, projectIdMono));
});
})
.flatMap(tuple -> {

View File

@ -89,15 +89,6 @@ ff4j:
- name: emailDomains
value: appsmith.com,moolya.com
- uid: LIMITING_GOOGLE_SHEET_ACCESS
enable: true
description: Enable limiting gsheet access feature by email domain of the user
flipstrategy:
class: com.appsmith.server.featureflags.strategies.EmailBasedRolloutStrategy
param:
- name: emails
value: integrations@appsmith.com
# Put EE flags below this line, to avoid conflicts.
- uid: LAZY_CANVAS_RENDERING
enable: true