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
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
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
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.
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
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.
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
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
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
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
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
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
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.
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
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