* Adding debugbar layer
* Adding sql debugbar info
* Make duration consistent across the debugbar lines
* Adding the debugbar/systeminfo endpoint
* Adding logs to the debugbar
* Improve the debugbar logger fields info
* Improving the debug bar architecture
* Allow to enable/disable debugbar in the backend
* Exposing the Debug Bar enable in the client config
* Adding more system information to the debugbar
* Adding params info to the store layer
* Organizing a bit the debugbar code in the server and adding some extra data to the system info api
* Adding debugbar email traces
* Changing the socket event name to 'debugbar'
* Adding explain support for the debugbar
* Adding missed file
* Omitting data related to the debugbar itself
* Removing unneeded functions
* Avoid arbitrary execution in explain api
* Moving debugbar inside the platform directory
* Replacing debugbar logger with a new logger Target
* Removed uneeded changes
* Fixing some linter errors
* Adding a debugbar log level to use it later for log events strictly related to the debug bar
* Fixing linter errors
* Fixing tests
* Adding i18n strings
Instead of being completely hardcoded, public key is now set at build time according to build tag (test key if `testlicensekey` tag is passed to go build, production key otherwise). A `isProdLicensePublicKey` is also available for determining if the prod license key is being used. It is needed for choosing whether to point to production or test environment CWS.
The test license key and CWS url values in this value are set to production values in this PR, but will be updated to the test values once we are ready to do the necessary updates to test environment spinwicks.
This ticket does a number of improvements to the email
batching code in general.
- Fix unbounded goroutines: We now send mails using a single
goroutine only. Since anyways the processing is asynchronous,
performance should not matter.
- Move the exit condition earlier: We have moved up the check
for the per-user email interval preference. This prevents
unnecessary DB calls from happening.
- Break from the loop properly: The objective was to not
send notifications if a user has viewed any channel since
a notification was queued. But there were 2 nested for loops
and we were breaking from just one and not the other. That is
correctly fixed now to prevent unnecessary DB calls.
- Gracefully shutdown the job: The batching task wasn't
properly shut down and could have notifications in-flight
which would have not got sent. We fix that now by cancelling
the task and waiting for it to finish.
https://mattermost.atlassian.net/browse/MM-50393
* [MM-50534] - Renew email adds portal link when not eligible for self-serve renewal
* fix translations
* make more checks
* improve endpoint to make checks
* use new checks
* fix translations
* fix lint
* add meaningful names
* rename struct
* rename endpoint
* Ignore archived DM channels with deleted second user
* Add tests
* Add store test
* Add error check for post delete in test
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
The webapp needs to construct the full message because
the team_name needs to be inserted into the permalink.
So we need to send everything in the metadata for the
client to construct the message.
Also, we set a custom post type for the client to easily
add a custom condition.
```release-note
NONE
```
* MM-48246 - AB test open RHS with linked board
* fix linter
* fix go vet complain
* implement pr feedback
* fix mispelling
* remove unnecesary comment
* add pr feedback
* fix translation texts
* fallback for the first system stored value
* implement PR feedback
* prevent calling property from potential null object
* use the default hash id for welcome to boards template
There were multiple issues at play here.
1. If the plugin was disabled in ch.syncPlugins,
then the prepackaged plugin would not be processed.
Therefore, if there was an earlier version of the plugin
that remained in S3, that would show up instead.
Therefore, we have to let the full plugin extraction
procedure go ahead, but not enable focalboard.
2. We also need to send the disablePlugin signal
to the other node. But the signal won't be sent
until the cluster leader is elected and inter-node
communication is set up. Therefore, we need to listen
to the ClusterLeaderChanged event and send out
a disable plugin event as well.
When both these issues are taken care of,
then we would correctly see the version of the plugin
from the prepackaged_plugins directory in the disabled
state.
https://mattermost.atlassian.net/browse/MM-49485
```release-note
NONE
```
* MM-49048: do not omit needed wsbroadcast vars
It seems that we are omitting ContainsSanitizedData, and
ContainsSensitiveData variables in WebsocketBroadcast.
This created a bug in cluster mode, in which we were sending duplicate
events to users whereas normally they would have access to only one of those.
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-49813 - validate members invitation permissions to private channels
* Validate on the receiver side that the sender id still has permissions to invite
* add translations
* fix texts
* simplify implementation
* remove local test hardcoded data
* add test to user_test
* fix vet warning
* Add comments to validate user permissions function
Co-authored-by: Martin Kraft <martin@upspin.org>
* regenerate app layer iface
* fix unit test
* fix app user_tests
---------
Co-authored-by: Martin Kraft <martin@upspin.org>
* MM-49845: fixes acknowledgements in getpostsince
GetPostsSince returns posts updated after a user requested date.
If a user acknowledges a post the post's update at won't change thus not
getting that post returned from GetPostsSince. This is troublesome
particularly for the mobile client since it relies a lot to
GetPostsSince for keeping the data up to date.
This commit updates the post's update_at when a user
acknowledges/un-acknowledges a post fixing this way the issue above.
* Fixes linter
* Apply suggestions from code review
style changes
Co-authored-by: Jesse Hallam <jesse@thehallams.ca>
* Rename ack to acknowledgement
Co-authored-by: Jesse Hallam <jesse@thehallams.ca>
* remove limits we do not listen to anymore
* add back boards property for focalboard project compatibility
* remove boards cards as paid feature
* remove lingering unlimited integrations paid feature