* promote user to admin upon login
* Add SAML support for admin accounts
* update en.json
* update i18n
* Add tests as per comments
* change function name
* fix config.go
* invalidate cache so its not checking for cache when roles change
* add enable attribute and filter
* MM-20644: Add users to teams as a SchemeAdmin based on a new configuration field on GroupTeams and GroupChannels records.
* MM-20644: Adds SchemeAdmin to mapping of the GroupSyncable struct fields.
* MM-2064: Adds test to ensure SchemeAdmin field value is mapped.
* MM-20644: Adds missing index creation for fresh DBs.
* MM-20644: Duplicates UpdateMembersRole across Team and Channel stores. Adds tests.
* MM-20644: Fixes some old method name references.
* MM-20644: Moves variable declaration; removes Println statement.
* MM-20644: Use a SQL query instead of two to update Team and Channel members.
* MM-20644: Fixes tests; updates query.
* MM-20644: Fix permission check for patching a group syncable.
* MM-20644: Fixes test for change of permissions verification in group patch API request.
* MM-20644: Fix for ORM select vs insert.
* MM-20644: Linting fixes.
* MM-20644: Fixes some tests.
* MM-20644: Skips changing the role of guests.
* MM-20644: Added syncableID filtering
Display LHS bot Icon in web app. As part of mentioned task, Added LastIconUpdate variable in model.bot to store last update time of icon. Also added code to update/delete value of the mentioned variable when setting/deleting bot icon.
* Make WebSocketEvent type immutable
* Update code to use updated immutable WebSocketEvent type
* Export WebSocketEvent fields and mark them as deprecated
* migrated termsOfServiceCache from sqlstore to localcachelayer, and mocked store tests
* revert gitignore local change
* fixed caching in termsOfService Get, and added basic tests for termsOfServiceCache
* added a test for cache save, and fixed call to Store tests
* fixed GeLatest termsOfService from cache test
* added license headers to terms_of_service cache files
* using doStandardReadFromCache and doStandardAddToCache when reading and writing to cache
* removed unused variable, termsOfServiceCacheName
* added special key for the latest termsOfService value in termsOfServiceCache
* updated license information on localcachelayer termsOfServiceCache files
* fixed not updating latest termsOfServiceCache on Get by ID, and invalidating cache cluster on termsOfServiceCache save
Co-authored-by: mattermod <mattermod@users.noreply.github.com>
* Implement allowing multiple SAML Libraries
* fix unit tests
* updates based on review feedback
* Only set on startup, not config changes
* update unit tests, reload enterprise
* need to reset for previous tests
* update license statement
* fix licensing line
* Add notification, to sysadmins, when a user is disabled and the user
owns bots.
* If the user doesn't have any bots, there is no need to send a
notifcation to sysadmins
* Remove comment
* Update documention link
* Send as System
* Query teams for each sysadmin and add first response to hardcoded link.
* Remove fmt.print debug statements
* remove link with hard-coded team. Will add this as future enhancement
Expose GetDisableBotSysadminMessage function so it can be tested
Add test new function for testing new notification feature
* Fix shadow error
* Swap sentences in the message when System Console > Bot Accounts > Disable bot accounts when owner is deactivated: is set to false
* Another message correction
* Rename Custom Integrations to Integrations
* rename botsDisabled variable to disableBotsSetting
* - increase the number of bots and sysadmins queried to 1000.
- limit the number of bots printed in the post to 10, but mention the
total bots owned by the user
* Enable translations for sysadmin messages
* - Rename function. The actual purpose for the function is to notify
sysadmins that a user, that owned bots, was disabled.
- convert GetDisableBotSysadminMessage from a function to a method.
This allows getting *a.Config().ServiceSettings.DisableBotsWhenOwnerIsDeactivated
in the method and avoids having to pass the value as an input to a
function
* fix "make i18n-extract" error. Reorganize .json file
* Correct the upper range value to be the minimum of number of elements in the
userBots array, or the upper limit (10)
* replace t.fatal with require statements
fix golangci-lint errors
* Create separate message when user managed less than or fewer than 10 bots
Test cases for both message types
* fix i18n sorting
* Using pagination to get the bots and sysadmins instead of setting
arbitrary value for PerPage and only retrieving first page
* only use one translation ID for the message.
push all logic into the template so translators can view the logic
add disableBotsSetting and printAllBots variables to the translation
map
* Break the for loop once len(bots) < perPage value, instead of
breaking once there are no bots. This saves one additional call
* MM-8607: Add cluster support for server busy status
MM-8607: Busy.Cluster should be non-exported
MM-8607: rename logging field seconds -> expires_sec
MM-8607: each node clears its own busy flag
MM-8607: ensure unit tests are not sensitive to test machine speed
* MM-8607: chg comment to force CI rebuild
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
* Migrate channelPinnedPostCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer
* Remove GetPinnedPostCountFromCache
* Rearrange test to avoid undeclared variable
* MM-8607: add ability to turn off non-critical services under load
* server busy invalid param unit tests
* MM-8607: rename server busy endpoints
* MM-8607: handle case where App not initialized
* MM-8607: additional unit test cases per feedback.
* MM-8607: use decorator to check isbusy when adding endpoint route
* MM-8607: rename endpoints, use struct for json
* Update api4/system.go
Fix misspelled log output
Co-Authored-By: Saturnino Abril <saturnino.abril@gmail.com>
* MM-8607: fix i18n order; max seconds for server busy expiry
* Migrate webhookCache from store/sqlstore/webhook_store.go to the new store/localcachelayer
* Remove duplicated statistics and move several functions to the layer
* Put cache size in format minutes * 60seconds
* Move cache functions to layer functions over the caches
* Directly remove and purge caches in handleClusterInvalidate to avoid loops
* Some advances
* Partial advances
* Cache moved
* Tests finished
* Removed all test for PostStore (store/sqlstore) related with Cache. This is tested in the cache layer now
* MM-18356: Adds ability to paginate channel search.
* MM-18356: Minor refactor.
* MM-18356: Adds doc.
* MM-18356: Fixes doc.
* MM-18356: Some commentary, adds the total count to non-paginated responses, and removes a stray fmt.
* MM-18356: Fixes shadowed variable.
* MM-18356: Removes paginate field and API parameter.
* MM-18356: Adds method to check if channel search is a paginated request.
* MM-18356: Vet fix.
* Migrate channelMemberCountsCache cache from store/sqlstore/channel_store.go to the new store/localcachelayer
* Move cache functions to layer functions over the caches
* Directly remove and purge caches in handleClusterInvalidate to avoid loops and prepare details for layer with multiple caches
* Update BuildPushNotificationMessage (#12974)
* Update BuildPushNotificationMessage
* Included Category, Version, and Type
* Remove unnecessary function args
* [MM-16232] Build and return fetched notification (#13085)
* Build and return fetched notification
* Remove check on PushNotificationContents
* Ran i18n-extract
* Get UserId from session
* Re-add ReturnStatusOK
* Remove UserId from PushNotificationAck
* Always include channel name
* [MM-16232] Return after writing response and add default message (#13127)
* Return after writing response and add default message
* Include channel ID as well
* Localize default message
* Fix i18n
* MM-17549: use StatusNotFound when deleting plugin (#12983)
Trying to delete a plugin that does not exist should fail with a 404, not a 400.
Relates-to: https://mattermost.atlassian.net/browse/MM-17549
* MM-19630: marketplace: model ReleaseNotesURL (#13083)
Automatic Merge
* MM-20065: allow prepackaged plugin upgrade (#13076)
* MM-20065: allow prepackaged plugin upgrade
When locally installing prepackaged plugins, skip if a plugin exists with the same id and is the same or a newer version.
This is effectively a "poor man's" rework of prepackaged plugins to allow upgrade of prepackaged plugins via the marketplace. The larger plan to rework prepackaged plugins was deferred from v5.18.
Fixes: https://mattermost.atlassian.net/browse/MM-20065
* eliminate unnecessary installPlugin
* fix TestPluginSync defaults to match minio
* cleanExistingBundles
* close prepackaged filereader
* simplify
* Remove fmt and vet checks from CI
- golangci-lint already does the vet and fmt checks. Remove those
as it is redundant now.
- Also start running golangci-lint as part of the CI pipeline now
just as an extra layer of reliability.
* Incorporate review comments
* Adding golangci install to Jenkinsfile.pr too
* dummy commit to test jenkins
* Trying after cd to directory
* Fix ineffective assign