Commit Graph

385 Commits

Author SHA1 Message Date
Arpit Mohan
15cbd266b3 Ignoring the createdAt, updatedAt and version fields in BaseDomain object.
This is because the client sends us the complete document as is. This causes conflicts in MongoDB for versioning and java Instant deserialization.
2020-01-30 12:55:33 +05:30
Trisha Anand
f1b783f6c1 Merge branch 'feature/mongo-audit' into 'release'
Adding Mongo Audit

See merge request theappsmith/internal-tools-server!183
2020-01-30 06:15:21 +00:00
Arpit Mohan
d313f37f5c Adding mongo auditing to add createdAt and updatedAt timestamps to the documents in the DB.
At the moment, reactive Spring does not support AuditorAware implementation which also inserts the username of the user making the changes. Reference: https://jira.spring.io/browse/DATACMNS-1231.
2020-01-30 06:15:20 +00:00
Trisha Anand
a83bf9844c Merge branch 'hotfix/undo-logs-debug' into 'release'
Undo the logs added for pagination

See merge request theappsmith/internal-tools-server!181
2020-01-29 10:51:20 +00:00
Trisha Anand
655e26a986 Removing logs added to debug release for pagination. 2020-01-29 16:17:42 +05:30
Trisha Anand
3ed45f8308 Merge branch 'bug/duplicate-key-error-status-code' into 'release'
logs to help debug pagination issue

See merge request theappsmith/internal-tools-server!179
2020-01-29 10:22:22 +00:00
Trisha Anand
d3769bad62 In case of duplicate key, send the application error code instead of http error code so that frontend can handle the duplicate key error gracefully 2020-01-29 10:22:21 +00:00
Arpit Mohan
f10405cca9 Merge branch 'hotfix/delete-app-acl' into 'release'
Adding permission to delete the application by a user

See merge request theappsmith/internal-tools-server!178
2020-01-29 09:26:15 +00:00
Arpit Mohan
8e8152ea63 Adding permission to delete the application by a user 2020-01-29 14:52:45 +05:30
Trisha Anand
86df807ed5 Merge branch 'bug/duplicate-key-error-status-code' into 'release'
In case of duplicate key, send the application error code instead of http error code

See merge request theappsmith/internal-tools-server!177
2020-01-29 08:50:51 +00:00
Trisha Anand
c6da910c2b In case of duplicate key, send the application error code instead of http error code so that frontend can handle the duplicate key error gracefully 2020-01-29 08:50:50 +00:00
Trisha Anand
094de512f8 Merge branch 'hotfix/isPaginatedNullPointer' into 'release'
Null pointer exception being observed for actions which are not being paginated when executed.

See merge request theappsmith/internal-tools-server!176
2020-01-29 05:38:45 +00:00
Trisha Anand
a9dd24152c Fixed the null pointer exception which is happening because of isPaginated field not being available for non paginated APIs 2020-01-29 11:04:48 +05:30
Trisha Anand
254f009242 Merge branch 'feature/action-pagination' into 'release'
Handle server side pagination in action

See merge request theappsmith/internal-tools-server!174
2020-01-28 14:41:00 +00:00
Trisha Anand
17f4a6f2e8 Handle server side pagination in action 2020-01-28 14:40:59 +00:00
Arpit Mohan
7764038ce9 Moving the form login & logout endpoints to /api/v1/login and /api/v1/logout
This is to ensure that when we deploy in production, we can add redirect rules on Nginx. Now /api and /oauth2 urls will proxy to the API server while all other URLs will proxy to the frontend server.
2020-01-28 17:12:46 +05:30
Arpit Mohan
071171c26d Merge branch 'bug/move-action-invalid-missing' into 'release'
Bug : After moving action, the action's isValid field becomes null leading to null pointer error.

Because the action was being saved directly, the isValid and invalid fields which are computed every time an action is updated, was not getting computed. isValid and invalids being null led to null pointer error after the action was moved. Fixed that by calling update instead of saving the action directly.

See merge request theappsmith/internal-tools-server!175
2020-01-27 09:17:46 +00:00
Trisha Anand
687b664011 Because the action was being saved directly, the isValid and invalid fields which are computed every time an action is updated, was not getting computed. isValid and invalids being null led to null pointer error after the action was moved. Fixed that by calling update instead of saving the action directly. 2020-01-27 09:17:45 +00:00
Trisha Anand
feeea5b006 Merge branch 'feature/restapi-image-new' into 'release'
RestAPI Plugin now supports Content-Type : Image/*

See merge request theappsmith/internal-tools-server!173
2020-01-24 07:49:52 +00:00
Trisha Anand
d1705a1931 Corrected receiving the response from String to byte[] array. This ensures that binary responses can also be handled. Added handling of content type Image. 2020-01-24 07:49:52 +00:00
Trisha Anand
1ecd21c85e Merge branch 'feature/default-page' into 'release'
Controller end point to make a page default.

See merge request theappsmith/internal-tools-server!171
2020-01-23 14:45:06 +00:00
Trisha Anand
ff56dc9661 Added controller end point to make a page default. When creating a new application, the default page created is set to default=true. Also, when returning pages by application id and by application name, the page's default status is returned as well as part of PageNameIDDTO 2020-01-23 14:45:05 +00:00
Trisha Anand
4bc4830405 Merge branch 'hotfix/propertyPaneChanges' into 'release'
Change required to add Column Actions to Table

See merge request theappsmith/internal-tools-server!166
2020-01-23 09:36:44 +00:00
Trisha Anand
c9cf2f4b94 Removing enum for WidgetSectionName and converting to a String
This is to ensure that the frontend can create sections as per their requirement and not be mandated by an enum in the server codebase.
2020-01-23 09:36:44 +00:00
Trisha Anand
3c0737b2fa Merge branch 'hotfix/updateLayoutNull' into 'release'
UpdateLayout Null Pointer Exception : In case the layouts are null or the DSL is null, it should be handled gracefully.

See merge request theappsmith/internal-tools-server!165
2020-01-21 05:57:35 +00:00
Trisha Anand
de722fff4e UpdateLayout Null Pointer Exception : In case the layouts are null or the DSL is null, it should be handled gracefully. 2020-01-21 05:57:35 +00:00
Trisha Anand
c8ee68b7aa Merge branch 'feature/refactor' into 'release'
APIs added for refactoring widget names and action names

See merge request theappsmith/internal-tools-server!161
2020-01-20 12:26:13 +00:00
Trisha Anand
d1c104a0e6 First attempt at refactoring widget name. Not tested. Pushing because of intellij constantly crashing 2020-01-20 12:26:13 +00:00
Arpit Mohan
ebfddeda94 Fixing minor bug in the invite flow which was causing the password to be hashed twice 2020-01-16 16:59:49 +05:30
Arpit Mohan
bf6a80074e Adding connection pooling to MongoDB to prevent too many connections from opening up 2020-01-16 15:07:15 +05:30
Trisha Anand
ff1e288aa8 Merge branch 'hotfix/use-plugin-exception-in-rest-api' into 'release'
Converted Exceptions thrown in RestAPI plugin to Appsmith Plugin Exception so that its handled correctly.

See merge request theappsmith/internal-tools-server!162
2020-01-15 12:33:16 +00:00
Trisha Anand
576453639f Converted Exceptions thrown to Appsmith Plugin Exception so that its handled correctly. 2020-01-15 17:59:11 +05:30
Trisha Anand
a29ec30798 Merge branch 'hotfix/log-execute-action' into 'release'
Added log for execute action

See merge request theappsmith/internal-tools-server!159
2020-01-15 09:13:27 +00:00
Trisha Anand
670ca4cb7e Added log for execute action 2020-01-15 09:13:27 +00:00
Arpit Mohan
428b93683a Merge branch 'release' of gitlab.com:theappsmith/internal-tools-server into release 2020-01-14 17:14:26 +05:30
Arpit Mohan
bb8b127e2d Fixing bug again to save the reset password token in the DB.
We need to use flatMap instead of map else the Mono will not run to save the token in the passwordResetToken collection
2020-01-14 17:13:42 +05:30
Trisha Anand
b06d12ecdc Merge branch 'feature/restapi-form-data' into 'release'
For non json body, set the result body as string instead of parsing

See merge request theappsmith/internal-tools-server!157
2020-01-14 09:48:43 +00:00
Trisha Anand
f4a2a73abe In case of non json results, set the result body as string, otherwise parse the json and then store it as jsonNode 2020-01-14 09:48:43 +00:00
Arpit Mohan
9e6c54b343 Merge branch 'hotfix/github-login-cleanup' into 'release'
Cleaning up the Github OAuth2 login flow by adding userNameAttribute to properties

This property helps define for Spring security which field in the OAuth2 user info to read in order to determine the username of the user. This is because this field is non-standard across different OAuth2 implementations. For each new OAuth2 provider that we support, this field will be required. Else the default name field will be picked up by Spring security (which is usually the id of the user).

See merge request theappsmith/internal-tools-server!156
2020-01-14 03:10:44 +00:00
Arpit Mohan
2b0a21bbab Cleaning up the Github OAuth2 login flow by adding userNameAttribute to properties
This property helps define for Spring security which field in the OAuth2 user info to read in order to determine the username of the user. This is because this field is non-standard across different OAuth2 implementations. For each new OAuth2 provider that we support, this field will be required. Else the default name field will be picked up by Spring security (which is usually the id of the user).
2020-01-14 08:36:54 +05:30
Arpit Mohan
aadce4ade9 Merge branch 'feature/delete-application' into 'release'
Mock delete application which returns the application object which was being attempted to be deleted.

See merge request theappsmith/internal-tools-server!155
2020-01-13 13:06:43 +00:00
Trisha Anand
660e47a819 Mock delete application which returns the application object which was being attempted to be deleted. 2020-01-13 13:06:42 +00:00
Trisha Anand
46f5775c62 Merge branch 'feature/move-duplicate-action' into 'release'
API Page Association

See merge request theappsmith/internal-tools-server!149
2020-01-13 12:07:10 +00:00
Trisha Anand
28e20ed3bd Move action also works successfully in removing the action from the previous page's onLoadActions while moving to another page. 2020-01-13 12:07:10 +00:00
Arpit Mohan
a542abc563 Adding quick fix for email validation check before we send an email to the user.
This is because there are OAuth2 providers who don't provide an email ID of the user. In those scenarios, we cannot send a welcome email to the user.
2020-01-13 17:35:23 +05:30
Arpit Mohan
56b54e1d17 Fixing bugs in the Github login flow to check for uniqueness of user
Github auth doesn't return the email ID of the user. Hence, we need to use the `login` attribute of the user profile information.
2020-01-13 15:50:00 +05:30
Arpit Mohan
dd4a0ed5dd Merge branch 'feature/github-login' into 'release'
Adding Github login feature. Also adding condition to limit domain access in Google OAuth2

The domain restriction has been done by adding parameter `hd` in the function CustomServerOAuth2AuthorizationRequestResolver#authorizationRequest. We still verify if the OAuth2 response has the parameter `hd` to ensure that no client side manipulation has been performed.

See merge request theappsmith/internal-tools-server!153
2020-01-13 06:47:17 +00:00
Arpit Mohan
db27e7c86c Adding Github login feature. Also adding condition to limit domain access in Google OAuth2
The domain restriction has been done by adding parameter `hd` in the function CustomServerOAuth2AuthorizationRequestResolver#authorizationRequest. We still verify if the OAuth2 response has the parameter `hd` to ensure that no client side manipulation has been performed.
2020-01-13 12:13:53 +05:30
Arpit Mohan
7622d76f32 Adding the property server.use-forward headers in order for Spring security to function properly behind a Nginx load balancer
This property helps the spring security library derive the host name, protocol and port accurately even while running behind a Nginx load balancer. This is because nginx adds X-Forward-* headers that are parsed by Spring security library.
2020-01-13 10:25:43 +05:30
Arpit Mohan
f374638d98 Adding exception stack trace to the login failure scenarios for debugging. 2020-01-10 18:11:29 +05:30