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
Trisha Anand
3dafccba2e
In case of sending email for an existing user, fixed the URL.
2020-06-12 13:30:53 +05:30
Shrikant Kandula
ab83bc0223
Fix problem where not all apps were getting policies when invited.
2020-06-11 20:56:52 +05:30
Trisha Anand
e7e008dcd2
Fixed the repository function which was failing for fetching actions during updateLayout.
2020-06-11 07:22:16 +00:00
Shrikant Kandula
1ce336257c
Mark any 2xx status code in REST API plugin as successful execution.
2020-06-10 10:51:07 +00:00
Trisha Anand
7a658ce5ea
App viewer user in an organization should have read:organizations permission.
2020-06-10 15:55:29 +05:30
Trisha Anand
491afc3599
In case of global datasource, no need to check for organizationId during action create.
2020-06-10 09:08:01 +00:00
Trisha Anand
a89355a5ec
Fixes bugs : 1. read:datasource permission should not be applied to application; 2. A user shouldn't be added to an organization if the user already exists in the organization.
2020-06-10 06:22:16 +00:00
Trisha Anand
ac06cc9668
1. user permissions during create/update of actions and datasources would now be set.
...
2. During update, policies are set to null in the update object to ensure that the policies are not overwritten to empty set.
2020-06-09 20:25:13 +05:30
Arpit Mohan
bbd33c2968
Removing the query field in ActionConfiguration and using String body as the field to store the query
...
This is to simplify the query pane on the frontend client. The client doesn't need to have separate interfaces for sql and non-sql plugins. All queries will be sent to the server in the form of a String that is parsed in different formats based on the plugin.
Also adding test cases for PostgresPlugin. Used TestContainers to simulate the postgres db in Docker inside the Java test itself. Very useful.
2020-06-09 12:12:27 +00:00
Trisha Anand
061577d2c9
Bug : When the user tries to invite without selecting the role user, this leads to null pointer exception.
...
Fix : A user CAN NOT be invited to an organization without specifying the role.
2020-06-08 14:56:12 +00:00
Trisha Anand
a888d54059
Changed the get all actions function to fix the bug where find by Example is not working. Instead the same has now been implemented using criteria.
2020-06-08 12:05:49 +00:00
Trisha Anand
9ac7e817cc
Merge branch 'feature/acl-remove-getCurrentOrganization' into 'feature/acl-spring-object'
...
Removed the usage of get current organization id. Added organization id to a few api calls.
See merge request theappsmith/internal-tools-server!367
2020-06-08 06:45:04 +00:00
Trisha Anand
a31796a216
Removed the usage of get current organization id. Requires addition of organization id to a few api calls.
2020-06-08 06:45:04 +00:00
Trisha Anand
f9d63f9881
Adding a 3P Api to a page now also expects the client to send the organization id.
2020-06-05 16:14:15 +05:30
Trisha Anand
87aafd6cf4
Adding test case for testDatasource
...
Refactoring the testDatasource code by moving the business logic to the service layer.
2020-06-05 10:05:23 +00:00
Arpit Mohan
1a68b7f561
Fixing the DSL Json for default layouts in new pages.
2020-06-04 16:13:47 +05:30
Trisha Anand
9e1742c289
Add OrgId to the output of the api used to return all the page ids and names given an application (id or name)
2020-06-04 08:08:15 +00:00
Arpit Mohan
1ac69bab50
Modifying the default page name to Page1
...
Also creating a default empty layout when a new page is created. This ensures that the client can show the default message on new page creations.
2020-06-04 13:05:34 +05:30
Trisha Anand
f8cf87e3c8
Invite existing user to an organization works. Updated the test case for adding user to an organization as well to use the new API.
2020-06-01 17:39:27 +00:00
Trisha Anand
f1e1e6959a
Bug : New users aren't able to read their own user object and hence homepage doesnt load.
...
Fix : Added lateral permissions for user on create.
2020-05-29 05:28:30 +00:00
Trisha Anand
d6670c70cc
Bug Root Cause : New users have no applications inside the organizations(s). In this case, get all applications does not return back organizationApplications object.
...
Fix : In getAllApplications, instead of iterating over collections of applications which could be empty, we iterate over organizations where we are guaranteed to have atleast one organization.
2020-05-28 13:31:24 +05:30
Trisha Anand
6475be63d1
Baseline code added for cascading the org level permissions to applications, pages and eventually actions.
2020-05-27 14:36:57 +00:00
Arpit Mohan
d20e92a587
Modifying the Action object to include an array of Property for dynamicBindingPathList
2020-05-27 13:16:38 +05:30
Arpit Mohan
9f82bde92c
Adding statusCode from AppsmithPluginErrors when plugins error out
...
This ensures that we can always display a status code on the client.
2020-05-26 11:50:09 +00:00
Trisha Anand
59a83d414b
Added description to roles for organization appsmith roles.
2020-05-26 10:49:42 +05:30
Arpit Mohan
a569156029
Merge branch 'hotfix/action-error' into 'release'
...
Creating the actionExecutionResult object for error scenarios as well.
See merge request theappsmith/internal-tools-server!354
2020-05-23 07:23:13 +00:00
Arpit Mohan
e6b7ffca9c
Creating the actionExecutionResult object for error scenarios as well.
...
This ensures that we can populate the request fields for all action executions
2020-05-23 12:49:01 +05:30
Trisha Anand
0c9c95bc9a
Fixed the findAll repository function which was leading to get all actions via application id to throw an internal server error.
2020-05-22 15:56:09 +05:30
Trisha Anand
d98fce3d09
WIP: adding helper functions for adding/removing roles from an organization. Adding role updates the organization right now. Removing role -> added a helper.
...
TODO : finish the above code flows + cascade these to the children objects of the organization -> Applications/Pages/Actions.
2020-05-21 15:05:43 +00:00
Shrikant Kandula
7037d99cfa
Use sequences for numbering new datasources.
2020-05-20 11:21:32 +00:00
Trisha Anand
e95b680169
create application now expects organization id. Fixed the test cases which broke because of this basic change in the way applications are created.
2020-05-19 17:09:51 +00:00
Shrikant Kandula
b13a7a5df3
Fix incorrect call to updatedAt.
2020-05-19 19:25:32 +05:30
Shrikant Kandula
329587f5ff
Fix NPE when using datasources without updatedAt.
2020-05-19 13:48:58 +00:00
Arpit Mohan
14c1778645
Merge branch 'bug/curl-auto-add-protocol' into 'release'
...
Automatically add protocol to URL provided to cURL command.
Notion ref: <https://www.notion.so/appsmith/CURL-import-for-incomplete-but-valid-URLs-like-www-google-com-leads-to-the-URL-not-getting-read-Th-9191456cb1b24cd68b92072c1a6f3ab6 >.
See merge request theappsmith/internal-tools-server!343
2020-05-19 04:23:59 +00:00
Shrikant Kandula
db0532941d
Automatically add protocol to URL provided to cURL command.
2020-05-19 04:23:58 +00:00
Arpit Mohan
85ea6563db
Merge branch 'hotfix/server-use-forward-headers' into 'release'
...
Adding the ForwardedHeaderTransform bean to enable spring to parse...
Adding the ForwardedHeaderTransform bean to enable spring to parse X-Forwarded-* headers from Nginx proxy
See merge request theappsmith/internal-tools-server!344
2020-05-19 03:56:40 +00:00
Arpit Mohan
158f5c8203
Adding the ForwardedHeaderTransform bean to enable spring to parse X-Forwarded-* headers from Nginx proxy
2020-05-19 09:22:33 +05:30
Shrikant Kandula
bffd68b1a9
Merge branch 'bug/postgres-empty-result' into 'release'
...
Don't fail after executing a non-SELECT query on Postgres.
See merge request theappsmith/internal-tools-server!341
2020-05-18 13:42:24 +00:00
Shrikant Kandula
c4d3d535a1
Rename isExecuteOnLoad to executeOnLoad.
...
The `is` prefix apparently makes Spring unhappy.
2020-05-18 12:13:54 +00:00
Shrikant Kandula
c18c344f4b
Don't fail after executing a non-SELECT query on Postgres.
2020-05-15 18:13:36 +05:30
Shrikant Kandula
180002a984
Handle errors when destroying stale connections.
...
This happens when the stale connection is an invalid connection object,
like when if it's created with invalid credentials etc.
2020-05-15 03:26:35 +00:00
Arpit Mohan
4fa254a449
Adding error log message whenever an action execution fails because of invalid datasource
2020-05-14 15:26:05 +05:30
Arpit Mohan
a9580effa7
Using the last value of duplicate headers as that is the behaviour displayed by webclient and other clients as well.
2020-05-14 08:49:06 +05:30
Arpit Mohan
71d8812feb
Fixing bug where duplicate headers were being set in the action execution result
...
Also removing empty headers from being sent to the action
2020-05-14 08:11:24 +05:30
Arpit Mohan
fb9e9fbf4c
Request body and header in Action Execution Response
2020-05-14 02:08:46 +00:00
Trisha Anand
5829a92998
Merge branch 'release' into feature/acl-spring-object
...
# Conflicts:
# appsmith-server/src/main/java/com/appsmith/server/services/ActionServiceImpl.java
2020-05-13 23:37:31 +05:30
Trisha Anand
9a8bf9dc89
In case the user is not signed in, return a 401 so that the user can be redirected to login by the frontend.
2020-05-13 18:00:03 +00:00
Shrikant Kandula
9c48f42990
Rename ActionExecutionResult.shouldCacheResponse -> isExecutionSuccess.
2020-05-12 18:25:49 +05:30
Shrikant Kandula
b65690ec74
Automatically use a unique name for creating datasources without name.
...
In the request from frontend for datasource creation, if the data
doesn't have a `name` value, we now set it to an automatically numbered
value and save with that.
2020-05-12 16:05:29 +05:30
Shrikant Kandula
7f4d32e7d4
Report error when cURL command is invalid.
2020-05-12 04:12:55 +00:00
Trisha Anand
6cdab92bbe
Merge branch 'feature/acl-action-inheritance' into 'feature/acl-spring-object'
...
Action Permission Inheritance during create.
See merge request theappsmith/internal-tools-server!329
2020-05-08 15:39:36 +00:00
Trisha Anand
b7435e546f
Added action inheritance for permissions during create. No update permissions for action added. Fixed the existing test cases to run with the new code.
...
TODO : Add test cases for action permissions.
2020-05-08 15:39:36 +00:00
Trisha Anand
02de2ea1f6
Removing Arn because its not being used anymore.
2020-05-08 21:08:16 +05:30
Trisha Anand
f7bb87824c
Merge branch 'release' into feature/acl-spring-object
...
# Conflicts:
# appsmith-server/src/main/java/com/appsmith/server/domains/User.java
2020-05-08 20:57:51 +05:30
Trisha Anand
d7637355fe
Create Page always sets the inherited policies from the application. Update Application policy remains to be done. Leaving it as a TODO for now.
2020-05-08 16:32:46 +05:30
Shrikant Kandula
ffc4379a4d
Migration to install existing default plugins to existing organizations.
2020-05-08 11:46:13 +05:30
Shrikant Kandula
7673ee49eb
Merge branch 'chore/remove-index-annotations' into 'release'
...
Remove index annotations as they don't accurately reflect actual indexes
See merge request theappsmith/internal-tools-server!322
2020-05-08 01:58:43 +00:00
Shrikant Kandula
b8de4ef659
Remove index annotations as they don't accurately reflect actual indexes
2020-05-08 01:58:43 +00:00
Shrikant Kandula
2e9a94341b
Guard against NPE when action is null due to cURL command being invalid.
2020-05-08 01:22:02 +00:00
Trisha Anand
44ce0bbf01
Added baseservice function add and remove policies to an object. This would be used for updating permissions for an object.
2020-05-07 19:39:36 +05:30
Trisha Anand
957116409d
Resolved the review comments. Changed the structure of the DTO returned. Added the userPermissions as part of the base domain leading to this field always computed before returning any object to the user.
2020-05-07 10:49:48 +00:00
Trisha Anand
485eb29e03
Added timeout in DslActionDTO which is used to represent actions inside a layout and in turn is used for page load action execution.
2020-05-07 15:06:16 +05:30
Shrikant Kandula
f7f03c5ad7
Add delete:datasources permission to all existing groups.
2020-05-05 13:52:03 +05:30
Trisha Anand
1f25aac3a5
Untested mock get applications for home page.
2020-05-01 16:56:05 +05:30
Trisha Anand
bc99ce9244
Merge branch 'release' into feature/acl-spring-object
2020-04-30 17:50:32 +05:30
Shrikant Kandula
fc1b73773e
More readable plugin names.
2020-04-29 11:49:06 +00:00