Commit Graph

843 Commits

Author SHA1 Message Date
Trisha Anand
ee1889da14 Merge branch 'bug/acl-app-datasource-permissions' into 'feature/acl-spring-object'
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. 3. Save action was failing .

See merge request theappsmith/internal-tools-server!374
2020-06-10 06:22:16 +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
Arpit Mohan
3cf8ff008f Hacky fix for the postgres plugin to work. Including the dependency in the appsmith-server/pom.xml file instead of the plugin 2020-06-10 10:46:09 +05:30
Trisha Anand
27fcb2dff8 Merge branch 'feature/acl-datasource-crud-policies' into 'feature/acl-spring-object'
Bug Fix : 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.

See merge request theappsmith/internal-tools-server!373
2020-06-09 15:01:59 +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
f74e8a45be Merge branch 'feature/query-action-configuration' into 'release'
Remove the query field in ActionConfiguration and use body instead

The client code is getting complicated because of the difference in SQL and non-SQL handling of the query field in actionConfiguration. If we expect the request to be sent in the `body` field, the plugin can parse the String body however it feels like.

See merge request theappsmith/internal-tools-server!340
2020-06-09 12:12:27 +00:00
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
8ff7c56e64 Merge branch 'feature/rest-form-data' into 'release'
Handling form data via the field bodyFormData in ActionConfiguration

This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.

See merge request theappsmith/internal-tools-server!370
2020-06-09 05:48:16 +00:00
Arpit Mohan
99e7519550 Handling form data via the field bodyFormData in ActionConfiguration
This is because the client sends us the data for form-data in the form of a list of Property fields with keys and values. This is consistent with how the client stores & renders headers & query parameters as well.
For MediaType application/x-www-form-urlencoded we will use the bodyFormData field.
2020-06-09 05:48:16 +00:00
Trisha Anand
7d83cfdae9 Merge branch 'bug/acl-empty-role-name' into 'feature/acl-spring-object'
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.

See merge request theappsmith/internal-tools-server!369
2020-06-08 14:56:12 +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
a3af1384d1 Merge branch 'bug/acl-get-all-actions' into 'feature/acl-spring-object'
Bug Fix : Get all actions by application ID returning empty result : 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.

See merge request theappsmith/internal-tools-server!368
2020-06-08 12:05:49 +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
bea724570f Merge branch 'feature/acl-rapid-api' into 'feature/acl-spring-object'
Adding a 3P Api to a page now also expects the client to send the organization id.

See merge request theappsmith/internal-tools-server!366
2020-06-08 05:41:53 +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
1923f0ddea Merge branch 'feature/acl-datasource' into 'feature/acl-spring-object'
ACL for datasource

See merge request theappsmith/internal-tools-server!362
2020-06-05 10:05:23 +00:00
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
Arpit Mohan
c6a87eba51 Merge branch 'hotfix/change-default-page-name' into 'release'
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.

See merge request theappsmith/internal-tools-server!363
2020-06-04 08:16:54 +00:00
Trisha Anand
c7cd46bed4 Merge branch 'feature/acl-add-orgId-application-pages' into 'feature/acl-spring-object'
Add OrgId to the output of the api used to return all the page ids and names given an application (id or name)

See merge request theappsmith/internal-tools-server!364
2020-06-04 08:08:15 +00:00
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
fa3a593bc2 Merge branch 'feature/acl-invite-user' into 'feature/acl-spring-object'
New Invite User Flow

See merge request theappsmith/internal-tools-server!359
2020-06-01 17:39:27 +00:00
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
Arpit Mohan
b0b72d965c Merge branch 'bug/acl-new-user-policies' into 'feature/acl-spring-object'
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.

See merge request theappsmith/internal-tools-server!358
2020-05-29 05:28:30 +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
53d81e8ed6 Merge branch 'bug/acl-empty-homepage' into 'feature/acl-spring-object'
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

See merge request theappsmith/internal-tools-server!357
2020-05-28 08:13:37 +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
Arpit Mohan
a24633e391 Merge branch 'feaure/acl-cascade-org-permissions' into 'feature/acl-spring-object'
Acl : Cascade org permissions to applications, pages and eventually actions.

See merge request theappsmith/internal-tools-server!355
2020-05-27 14:36:58 +00:00
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
6630446506 Merge branch 'feature/dynamic-binding-action' into 'release'
Adding dynamicBinding to Action

Also adding the status code to ActionExecutionResult when plugin returns with an error.

See merge request theappsmith/internal-tools-server!356
2020-05-26 11:50:09 +00:00
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
Arpit Mohan
c8cd7ad934 Merge branch 'bug/acl-getAllActions' into 'feature/acl-spring-object'
BaseRepository : findAll function fixed.

See merge request theappsmith/internal-tools-server!353
2020-05-22 10:31:35 +00:00
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
10b07d5912 Merge branch 'feature/acl-org-user-role' into 'feature/acl-spring-object'
GET Organization Users & part base code to update permissions given an org level role.

See merge request theappsmith/internal-tools-server!339
2020-05-21 15:05:43 +00:00
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
Arpit Mohan
0ee1699603 Merge branch 'bug/datasources-name-clashes' into 'release'
Use sequences for numbering new datasources.

Introduces a new collection in the database, `sequence`. We intend store one document per domain collection (hence a unique index on `name` field), which has a sequence number. The number is *always* set to a value that can be used next and never been used before (hence the human-readable-name `nextNumber`). Of course, this holds true only if the collection is accessed through `SequenceService.getNext(DomainClass.class)`.

This MR also includes two migrations. One for adding a unique index on `sequence.name`. Another for setting an initial value for the `nextNumber` for datasources, such that the next new datasource has a unique name. We are computing this value based off of the existing datasources named `Untitled Datasource <number>`, finding the highest number in the names and incrementing it.

See merge request theappsmith/internal-tools-server!351
2020-05-20 11:21:32 +00:00
Shrikant Kandula
7037d99cfa Use sequences for numbering new datasources. 2020-05-20 11:21:32 +00:00
Trisha Anand
8caf66d68a Merge branch 'feature/acl-new-create-application' into 'feature/acl-spring-object'
create application now expects organization id.

See merge request theappsmith/internal-tools-server!347
2020-05-19 17:09:51 +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
Arpit Mohan
eae29e5cba Merge branch 'bug/datasource-without-updated-at' into 'release'
Fix NPE when using datasources without updatedAt.

Notion ref: <https://www.notion.so/appsmith/NPE-in-DatasourceContextServiceImpl-be9b92a0d71848aea89dd695cd784034>.

See merge request theappsmith/internal-tools-server!348
2020-05-19 13:48:58 +00:00
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