* Add a controller for changing subscription
* Changes for PR
* Another change
* Fix pipeline
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* add request context
* move initialialization to server
* use app interface instead of global app functions
* remove app context from webconn
* cleanup
* remove duplicated services
* move context to separate package
* remove finalize init method and move content to NewServer function
* restart workers and schedulers after adding license for tests
* reflect review comments
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* [MM-35039] - Send trial ended email
* Generations
* Use First name with fallback to username
* Use First name with fallback to username for trial ending email
* Include user data in the cloud endpoints
Those headers will include the user ID and Email so we can use them
in CWS
* Removed AppError from enterprise/cloud
We're removing the AppError from all the places that don't belong
to the app or api4 packages.
* Remove unused i18n strings
* Move it to the server init of enterprise
Also moved the initialization of the enterprise part in the server after the store is initialized
* Initialize after the store is set in NewServer
The ideal way to do it should be to move the initEnterprise call after
the store is set but that would lead to undesired side-effects so we
initialize the cloud part alone.
Signed-off-by: Mario de Frutos <mario@defrutos.org>
* [MM-32691] - Send email when the users are not able to join a workspace
* Revert "[MM-32691] - Send email when the users are not able to join a workspace"
This reverts commit 3c11643c7c.
* Feeback impl-1
* use date as key for rate limiting
* Fix tests
* Translations
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* [MM-31497] - Prevent end users from inviting people and exceeding the free tier limits
* Update error
* Commit forgotten code
* Chnage impl-1
* Change impl-2
* Remove test
* Include tier status
* Renable permissions check
* Change endpoint name
* Update endpoint
* Update api4/cloud.go
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
* Add test for new endpoint
* Format code
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
* Adding email and scaffolding for payment failure in case where customer has not added payment method
* Adding email template
* Remove unused boolean
* Fix error
* Add Email Us verbiage
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add a new handler to allow authentication via CWS API Key
* Make error better
* Add tests and cases for new handler functions
* Move some code around
* Add test for GetCloudSession function
* unset the env after test completion
* Remove white space
* Add CWS Webhook endpoint and email code
* handle returned errors from email sending function
* Change FailureCode to FailureMessage
* Remove unnecessary translations
* Fix translations
* Forgot to add template
* Update api4/cloud.go
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
* Update api4/cloud.go
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
* Update api4/cloud.go
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
* PR changes
* Update app/email.go
Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
* Close body in proper spot
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
* [MM-28217] Server API to serve up cloud customer information
* Added missing client4 method
* merge'd
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* API pass-thru to the CWS for getting subscription
* Remove use of parameter in favour of env var
* Remove unnecessary param
* Removed unnecessary fields and added client4 method
* Some cleanup
* Translation fix
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>