Commit Graph

465 Commits

Author SHA1 Message Date
Trisha Anand
56acb5c9fd
New endpoint added to get actions by applicationId in view mode. (#88)
* New endpoint added to get actions by applicationId in view mode. Only id, name and jsonPathKeys are returned in view mode.
2020-07-13 23:27:49 +05:30
Trisha Anand
4a720b80e2
Removing the marketplace basic auth credentials which was hard coded into the code to environment variable. (#71) 2020-07-09 22:38:21 +05:30
Trisha Anand
8734067cad
Resolving the dependabot vulnerabilities. (#69) 2020-07-09 21:12:16 +05:30
trishaanand
9eedb15620
Updating anonymous user permissions for application and associated pages & actions when public access is modified (#57)
* On setting an application to public view, correct permissions are assigned to the application and its pages & actions.

* If anonymous user is allowed a certain permission, the all users (anonymous/logged in) should be allowed the certain permission.
2020-07-09 11:21:39 +05:30
trishaanand
53b61b4942
Skeleton code added for changing application view between public and private to help with client development. (#56) 2020-07-08 17:13:42 +05:30
trishaanand
a5a3a5f4a2
Bug fix - In case of invited user signing up on Appsmith, the password is getting doubly hashed leading to sign in breaking for this user. (#51)
* Bug fix is working. Added a test case which is not working.

* Code cleanup. Test case fixed. Now, when we set the user to enabled, we also store the password that has been passed to the flatMap.

* Minor code cleanup.
2020-07-08 13:16:13 +05:30
trishaanand
765f1c7164
Get user profile should return anonymousUser instead of 401 unauthorized in case the API is called without logging in. (#50)
This will help us display the 404 page on the client reliably.
2020-07-08 11:54:00 +05:30
trishaanand
c9703ea3b1
Special 404 handling and adding a few paths to the unauthenticated list to allow for public applications (#45)
* 404 error added for a few API calls which would be specially handled on the frontend to display an ACL 404 error.

* Putting everything except GET actions, GET pages, and GET applications behind authenticated. This ensures that in the future public applications (view only) would not lead to 401 but any other page would.

* Code formatted.
2020-07-06 20:21:07 +05:30
Shrikant Sharat Kandula
56547ec02f
Move application configuration to be loaded from environment variables (#23)
* Move application configuration to be loaded from environment variables
* Remove unused sentry.properties
* Make missing value sentinel a constant and ignore all *.env files
* Removed now-used ACL properties
* Prefix RapidAPI environment variable with APPSMITH_
* Fix application properties not being loaded into static fields
* Remove application-test.properties file
* Add required env variables for test in GitHub
* Quote URLs for MongoDB and Redis in test config
* Change RAPIDAPI to RAPID_API in environment variable names
* Source .env file in the root of repo in start script
2020-07-06 14:35:56 +05:30
trishaanand
4a05ba6ac5
An invited user on signup should be set to enabled and should not lead to duplicate key exception. (#36) 2020-07-06 12:46:46 +05:30
Arpit Mohan
3035ec9bef
Adding the Github action workflow for the server code (#24)
* Adding the Github action workflow for the server code

* Modifying the redis endpoint in application-test.properties to point to localhost because the Docker service exposes ports to the host
2020-07-03 14:40:57 +05:30
Arpit Mohan
fdeed757ff
Fixing the move action API by removing invocations to subscribe (#17)
* Fixing the move action API by removing invocations to subscribe

Calling subscribe() inside function calls is an anti-pattern and we shouldn't be doing it.
The reactiveContext is not called if the subscribe() function is called in the middle of execution flows. This breaks DB queries.

* Added test case for move action.

Co-authored-by: Trisha Anand <trisha@appsmith.com>
2020-07-02 15:41:45 +05:30
Shrikant Sharat Kandula
95b9860bf9
Give appropriate error when method is invalid in cURL command (#1) 2020-07-01 12:37:59 +05:30
Trisha Anand
930e577f98 Bug Fix : When page name is updated, the policies should not get overwrritten. Changed the base service function to reset the empty policies to null in case the update is not used to update the policies. 2020-06-27 19:45:24 +00:00
Trisha Anand
76e3db497c Bug fix : Google SSO for sign up led to the organization id for personal organization not getting set up. 2020-06-26 11:59:33 +00:00
Arpit Mohan
bbf0aef450 Merge branch 'bug/embedded-datasource-without-organization-id' into 'release'
When organizationId is null in a datasource, fail with the right error message

The organization id is subsequently used to find a matching plugin (checking for installation essentially), but when organization id is missing, this query never returns. But the error message reads as if the plugin is not installed, whereas it should've been that organization id is missing.

See merge request theappsmith/internal-tools-server!406
2020-06-26 11:43:16 +00:00
Shrikant Kandula
d5921ea52d When organizationId is null in a datasource, fail with the right error message 2020-06-26 11:43:16 +00:00
Trisha Anand
779c79476d Merge branch 'bug/acl-update-role-race-condition' into 'release'
Race condition bug caught in remove user from organization flow where multiple applicaitons/pages/actions exist for an organization.

See merge request theappsmith/internal-tools-server!407
2020-06-25 10:15:07 +00:00
Trisha Anand
57f4f734dd Race condition bug caught in remove user from organization flow where multiple applicaitons/pages/actions exist for an organization. 2020-06-25 15:39:32 +05:30
Shrikant Kandula
3217daab14 Fix Mustache rendering to work on object fields directly 2020-06-25 09:58:20 +00:00
Trisha Anand
6d103b4939 Untested changes for fixing the bug where duplicate policies are getting created for the same permission. 2020-06-25 08:09:59 +00:00
Trisha Anand
a73d182d73 Merge branch 'bug/org-creation' into 'release'
Bug fix : Create Organization is failing because the user is read from the session and not from the repository. Now reading the user at appropriate places.

See merge request theappsmith/internal-tools-server!405
2020-06-24 12:14:25 +00:00
Trisha Anand
aebb50d216 Bug fix : Create Organization is failing because the user is read from the session and not from the repository. Now reading the user at appropriate places. 2020-06-24 17:30:24 +05:30
Arpit Mohan
b63ca6726d Merge branch 'feat/plugin-templates' into 'release'
Add server-side templates support for plugins

Two main themes in this MR:

1. Add support for saving query templates as resource files inside a plugin. This has been done for both Postgres and MongoDB plugins, based on current template contents.
2. Loading of form JSON is now reactive. The blocking call has been moved inside a `Mono.fromSupplier`.
3. The loading of from JSON as well as the templates is cached and are loaded on-demand. This means that the templates are loaded once for a plugin through the lifetime of the server process, and that they are loaded only at the first time they are needed.
4. If loading of these resources fails, we try again when they are needed the next time.

See merge request theappsmith/internal-tools-server!385
2020-06-24 11:08:25 +00:00
Shrikant Kandula
eee2cfcaff Add server-side templates support for plugins 2020-06-24 11:08:25 +00:00
Shrikant Kandula
d7655ebb3c Add image location and documentation link fields to plugins 2020-06-24 08:28:54 +00:00
Arpit Mohan
0be492e8e9 Fixing OAuth2 SSO login for new ACL flow 2020-06-23 13:19:22 +00:00
Trisha Anand
0603da29ee User test - Add request URL and http method to the execution result 2020-06-19 16:24:58 +00:00
Shrikant Kandula
5ce19962a3 Merge branch 'chore/sending-email-should-be-nonblocking' into 'release'
Sending emails is now done in a non-blocking way

See merge request theappsmith/internal-tools-server!396
2020-06-19 07:14:43 +00:00
Shrikant Kandula
5f0a3034b8 Sending emails is now done in a non-blocking way 2020-06-18 17:29:36 +05:30
Shrikant Kandula
70c312ca40 Merge branch 'bug/disallow-delete-datasource-with-actions' into 'release'
Fail deleting datasource if there's actions against it

See merge request theappsmith/internal-tools-server!388
2020-06-18 10:41:49 +00:00
Shrikant Kandula
9f6a4f6ea5 Fail deleting datasource if there's actions against it 2020-06-18 10:41:48 +00:00
Shrikant Kandula
45961ddcde Merge branch 'bug/fail-on-invalid-page-id-when-creating-action' into 'release'
Fail with an error if can't find page when creating an action

See merge request theappsmith/internal-tools-server!394
2020-06-18 10:25:13 +00:00
Trisha Anand
63852041de Merge branch 'bug/delete-application-app-viewer' into 'release'
Bug Fix : Application and page can only be deleted if you have manage application/page permissions respectively.

See merge request theappsmith/internal-tools-server!395
2020-06-18 10:20:50 +00:00
Shrikant Kandula
f19764ab99 Merge branch 'bug/space-not-needed-in-header-in-curl' into 'release'
Fix parse error when there's a space in header in curl command

See merge request theappsmith/internal-tools-server!390
2020-06-18 10:11:39 +00:00
Trisha Anand
4337e88934 Application and page can only be deleted if you have manage application/page permissions respectively. 2020-06-18 15:35:30 +05:30
Shrikant Kandula
1d5fa960db Fail with an error if can't find page when creating an action 2020-06-18 15:05:55 +05:30
Trisha Anand
ec8c63bfee For invitation, throw a bad request error in case all the invite dto fields are not set. 2020-06-18 14:05:48 +05:30
Trisha Anand
e5282dac11 In case a page is opened in edit mode, it should open with permission of MANAGE_PAGE. In case the user is a viewer, the page must not open. 2020-06-17 17:34:26 +05:30
Trisha Anand
893698f09e Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	appsmith-server/src/main/java/com/appsmith/server/constants/FieldName.java
2020-06-17 15:10:23 +05:30
Trisha Anand
8fc99cf0bd In case a user is invited to an organization as developer, correct top permissions are being assigned via Appsmith role. 2020-06-17 09:33:00 +00:00
Shrikant Kandula
8e40240f25 Fix parse error when there's a space in header in curl command 2020-06-17 12:32:08 +05:30
Arpit Mohan
c6af229a97 Merge branch 'bug/default-page-action-refactor' into 'release'
Adding the widget names set to the default layout for a page

During action name refactor, we require the widget names to exist in the layout. Hence all default layouts must have the widgetName set.

See merge request theappsmith/internal-tools-server!387
2020-06-16 05:25:54 +00:00
Arpit Mohan
a4132d5845 Adding the widget names set to the default layout for a page 2020-06-16 10:50:07 +05:30
Shrikant Kandula
dd0ba857c2 Fix cURL import when using --url argument
Also fixes cases where there's a space between `-X` and `POST` and
similar cases.
2020-06-16 09:59:43 +05:30
Trisha Anand
9dfb72720e Fixed the broken test cases. 2020-06-12 19:35:01 +05:30
Trisha Anand
bb6dc61015 Build fix 2020-06-12 19:16:31 +05:30
Trisha Anand
73757c3425 Merge branch 'release' into feature/acl-spring-object
# Conflicts:
#	.gitignore
#	appsmith-plugins/mongoPlugin/plugin.properties
#	appsmith-plugins/postgresPlugin/plugin.properties
#	appsmith-plugins/rapidApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/plugin.properties
#	appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
#	appsmith-server/src/main/java/com/appsmith/server/constants/FieldName.java
#	appsmith-server/src/main/java/com/appsmith/server/repositories/ActionRepository.java
#	appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceContextServiceImpl.java
#	appsmith-server/src/main/java/com/appsmith/server/services/DatasourceServiceImpl.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ActionServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/ApplicationServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/LayoutServiceTest.java
#	appsmith-server/src/test/java/com/appsmith/server/services/PageServiceTest.java
#	build.sh
2020-06-12 19:14:31 +05:30
Shrikant Kandula
b391f46e2c ACL Migration Script 2020-06-12 11:54:21 +00:00
Trisha Anand
4eab663c8e Bug fix for forgot password error "user not found". During reset password, the user is not logged in and hence the permissions can not be applied during repository findByEmail 2020-06-12 13:57:57 +05:30