Now, we have an authenticationSuccessHandler & authenticationFailureHandler for OAuth & Form sign ups. This makes the whole flow much easier to handle.
Adding endpoint to fetch current user's profile.
Also redirecting the browser to this user profile endpoint on username password login success. This ensures that the client fetches the profile along with setting the session ID cookie in the browser
See merge request theappsmith/internal-tools-server!113
Also redirecting the browser to this user profile endpoint on username password login success. This ensures that the client fetches the profile along with setting the session ID cookie in the browser
Redirect to the client's homepage on success of username password login
This has been done with the express purpose of ensuring that the session ID is set correctly in the browser by the client. This can only happen when there is a 302 redirect by the browser.
See merge request theappsmith/internal-tools-server!112
This involves overriding the default success and failure handlers for login in the SecurityConfig class. The handlers are defined in the filters package.
Fixed : Unbinding action from page during DSL update leads to unbinding of all actions.
Removed unbinding of actions from the page if not present in the DSL.
See merge request theappsmith/internal-tools-server!110
Moving the annotation @EnableMongoAuditing to the CommonConfig class because it wasn't being acknowledged by Spring
This now ensures that Spring JPA inserts the createdAt and updatedAt timestamps to the MongoDB along with the document itself.
See merge request theappsmith/internal-tools-server!109
Removes pageId from actions no longer in DSL in action collection
Removes pageId from actions no longer in DSL and adds pageIds for actions in DSL in actions collection.
All of these operations are now happening in bulk to improve performance
See merge request theappsmith/internal-tools-server!107
Assigning groups & permissions to new user signups
When a new user signs up, a new personal organization is created for that user. Default permission groups are created for this personal organization based on the database that contains this information in the `groups` collection with organization name `default-org`. These default groups should NEVER be deleted from the DB.
The user is then assigned to these default groups which allows him/her to administer their personal organization as org admins
would.
Also, the `User` domain object now returns the email ID as the username of the user.
See merge request theappsmith/internal-tools-server!108
The default groups for an organization are created by copying over data from the groups collection with the organizationId 'default-org'. This ensures that we can update the permissions in the DB and add new permissions without any code changes. The new user is then assigned to these groups so that they have all the permissions required to administer the organization.
Also adding a display name for the groups so that the UI can show a different name than the one used internally within the DB to represent the group.
Create personal workspace/organization on user create
Create user now also leads to creation of personal organization for the user. It also gets assigned as the default (current) workspace (or currentOrganizationId)
See merge request theappsmith/internal-tools-server!105
Published page has layout on load actions and layout load actions now.
LayoutOnLoadActions are now being copied to the published version. Now viewing the published page would give all three published datastructures : DSL, Layout Actions, and Layout Load Actions
See merge request theappsmith/internal-tools-server!104
Adding email sending capability when the user resets their password
At the moment, the email sending is sent in the same thread that slows down the API request. Future changes should include:
1. Publish the request to send an email to Redis and actually send the email on subscribe event.
2. Disable the email sending in local environments.
See merge request theappsmith/internal-tools-server!102
Implementing Forgot Password flow + DB based password authentication
Changes include:
1. Create/Update user APIs now use `passwordEncoder` to encode the user password before storing it in the database.
2. Forgot password flow has been added.
3. Added a `PasswordEncoderConfig` to configure the encoder from a single location
4. Moving from in-memory `MapUserDetails` to DB for checking the password for a user during login.
5. Using `WithUserDetails` in all the tests because we now use our custom `User` domain object instead of Spring's `User` object in our session. The earlier implementation in the test cases was using Spring's implementation.
6. Adding a bunch of javadoc comments to `UserServiceImpl`
See merge request theappsmith/internal-tools-server!101
Get actions by pageId & applicationId
Query params "pageId" and "applicationId" can be used on Get call to actions api to all the actions by page Ids and application ids.
See merge request theappsmith/internal-tools-server!99
Checking if the name of the user is not null. Only then inserting it that field into analytics service.
See merge request theappsmith/internal-tools-server!97
Adding query parameters to filter get API calls
Fixes#92
Adding MultiValueMap in the BaseService class to ensure that all controllers support query parameters for the GET API call. Each service will have to handle this independently though. There is no generic default implementation for handling query parameters as of now.
In the Plugin APIs handling the filtering of fetching plugins specifically by type. This should be used as a template implementation to create a generic implementation of this nature to query the db generically for a list of given fields and values. Will make future API implementations much simpler.
See merge request theappsmith/internal-tools-server!91
Adding the base uri for google oauth2 redirect uri
This is required because when we host the server in a docker container, by default the baseUri picked up by Spring security is the DNS name of the appsmith server inside the docker networking bridge. These names may not be valid DNS names that Google can redirect to in the event of a successful Oauth2 login. Hence, we are overriding the base uri with our own uri for each environment.
The customer will have to provide this uri when they host it on their internal networks. This uri must be publicly accessible for Oauth2 to work.
See merge request theappsmith/internal-tools-server!90
This is required because when we host the server in a docker container, by default the baseUri picked up by Spring security is the DNS name of the appsmith server inside the docker networking bridge. These names may not be valid DNS names that Google can redirect to in the event of a successful Oauth2 login. Hence, we are overriding the base uri with our own uri for each environment.
The customer will have to provide this uri when they host it on their internal networks. This uri must be publicly accessible for Oauth2 to work.