* MM-30041: Return correct error message for user save
We were collapsing all types of user conflict into a single
error message. Fixed it by inspecting the field of the invalidError type
and returning the correct message.
https://mattermost.atlassian.net/browse/MM-30041
```release-note
NONE
```
* Fix test errors
* Fix wrong message in test when comparing error messages
Co-authored-by: Rodrigo Villablanca <villa061004@gmail.com>
* Adding files, commit of UI in good shape
* Translations added, working with activation and deactivation
* Add check for error
* Fix i18n?
* Push without subscription check so Steve and Matt can look at it
* Fix font-weight in chrome
* Fix font-weight on button
* UX fixes
* Fixes for PR
* Add back subscription stuff
* Fix tests
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Add check for ispaidtier to email invites
* Add same check for guest emails
* Update api4/team.go
Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
* Update api4/team.go
Co-authored-by: Mario de Frutos Dieguez <mario@defrutos.org>
* Check for an error and return if there is one
* Fix tests
* Remove test to move to enterprise repo
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>
* Filter settings sent to the client based on tag
Right now we're filtering in client the sections based on the
RestrictSystemAdmin setting but we're still sending those
settings through the API call.
In this PR we include a new tag cloud_restrictable and some
method to remove those settings/fields from the final JSON
sent to the client
* Basic framework for use of feature flags. Enviroment variable overrides.
* Use Apperr instead of error number increments.
* Undo random viper change.
* Update model/config_test.go
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
* api4/channel_test: skip if event is not recieved in time
* api4/channel: TestConvertChannelToPrivate increase timeout
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* api4/file: add missing return statement
* api4/file: add a test case for GetPublicFile; request a deleted file
* add missing check
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* MM-28536 User with write-auth should be able to use all saml related endpoints
* MM-28535 allow users with write auth to invalidate pending email invites
* Update api4/team_test.go
* No need for init basic
* Address review comments
* Fix test ordering
* Fix nil pointer dereference in addTeamMember
* Revert to simple nil check
* Add test case
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Summary:
fix getChannelByNameForTeamName to allow team members to join public channels. I'm not sure why, but the authorization logic of getChannelByName and getChannelByNameForTeamName was different. After this change they behave the same. This fixes an issue with the mobile app.
Ticket Link:
https://mattermost.atlassian.net/browse/MM-28100
Related PR: mattermost/mattermost-mobile#4810
* Implement LDAP Certificate
* add diagnostics and translations
* update from code review
* pass pointer to update pict function
* pass object to first function
* remove debug log messages
* update test to add localmode test
* update lint errors
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
MM-27744 disable Zap for unit tests.
Zap has no concept of shutdown or close. Zap is only shutdown when the app exits. Not a problem for console logging, but when creating a new Zap logger that outputs to files on every unit test, that leaves no easy way to clean up until process exit. Depending on what else is running this can exhaust all file handles and cause unit tests to fail.
Zap is now disabled unit tests and uses Logr instead, regardless of config settings. `make test-server` peak file handle usage dropped from ~5K to less than 100.