1. 08 Nov, 2018 1 commit
    • Harshil Sharma's avatar
      #146 Terms of Service Phase 2 (#9731) · 0c5f60f8
      Harshil Sharma authored
      * #132 added UserTermsOfService model
      
      * #132 added UserTermsOfService model
      
      * #132 added logic to save user TOS data in a new table
      
      * #132 Added logic to save and delete user TOS. Updated user TOS action logic
      
      * #132 updated store mocks
      
      * #132 added tests
      
      * #132 removed cache from UserTermsOfService SQL store
      
      * #132 fixed styling and license check
      
      * #132 added message translations in en.json
      
      * #132 fixed save user TOS logic to work second time as well
      
      * #132 removed User.AcceptedTermsOfService colum and migrated accepted TOS data into new table
      
      * #132 fixed formatting
      
      * #132 fixed formatting
      
      * #146 added field 'mandatory' to terms of service
      
      * #146 updated tests
      
      * #146 added getLatestTermsOfService API
      
      * #146 Added tests
      
      * #146 fixed styling
      
      * #146 removed code for managing mandatory/optional TOS
      
      * #146 Added TOS re-acceptance period config
      
      * #146 fixed styling
      
      * #146 removed some code left for debugging
      
      * #146 added TOS re-acceptance period in config
      
      * #146 fixed a json name from service_terms to terms_of_service
      
      * #146 Minor refactoring and added TOS re-acceptance period to diagnistics
      
      * Fixed style
      
      * Updated upgraded script to keep app backward compatible
      0c5f60f8
  2. 01 Nov, 2018 1 commit
    • Harrison Healey's avatar
      MM-11272 Added initial post metadata (#9175) · 48f16b64
      Harrison Healey authored
      * MM-11272 Added app.PreparePostForClient
      
      * MM-11272 Added app.PreparePostListForClient
      
      * MM-11272 Added EmojiStore.GetMultipleByName
      
      * MM-11272 Added emojis to PreparePostForClient
      
      * MM-11272 Added unit tests for getting reaction counts
      
      * MM-11272 Added unit tests for TestPreparePostForClient
      
      * MM-11272 Added emojis from reactions to Post.Emojis
      
      * MM-11272 Always update post.UpdateAt when reactions change to bust cache
      
      * Fixed merge conflicts
      
      * Moved post metadata-related code into its own file
      
      * Update store mocks
      
      * Fixed typo
      
      * Add missing license headers
      
      * Updated post metadata tests when custom emojis are disabled
      
      * Fix unreliable unit tests
      
      * Fix inconsistent casing in SQL statements
      
      * Fix blank line
      
      * Invalidate store cache after making changes
      
      * Clear post cache synchronously with reactions
      48f16b64
  3. 25 Oct, 2018 1 commit
  4. 17 Oct, 2018 1 commit
  5. 13 Oct, 2018 1 commit
  6. 10 Oct, 2018 2 commits
    • Daniel Schalla's avatar
      DeleteAll for KV (#9431) · c36e85c9
      Daniel Schalla authored
      Expire K/V Values
      
      Regenerate Code
      
      pathfix
      
      Update Expiry on Update
      
      Check for Exit Signal
      
      gofmt
      
      Rewrote Go Routine
      
      Remove tempoarily cleanup loop
      
      fix expiretime
      
      TEST: Expired Watchdog as GoRoutine
      
      Check if Srv is nil
      
      Use Scheduler/Worker for Expired Key CleanUp
      
      add license
      
      fix scheduler job type; DoJob Restructuring
      
      Remove unused imports and constants
      
      move db migration from 5.4 to 5.5
      c36e85c9
    • Harshil Sharma's avatar
      Refactored to rename "service terms" to "terms of service" (#9581) · bffcccf9
      Harshil Sharma authored
      * #124 renamed identififers from service terms to terms of service
      
      * #124 renamed identififers from service terms to terms of service
      
      * 124 renamed ServiceTerms model to TermsOfService
      
      * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService
      
      * 124 Renamed EnableCustomServiceTerms feature flag to EnableCustomTermsOfService
      
      * #124 fixed formatting
      
      * #124 fixed formatting
      
      * #132 renamed table ServiceTerms to TermsOfService
      
      * #124 renamed some missed files from 'service_terms' to 'terms_of_service'
      
      * #124 removed fixed TODOs
      
      * drop migrate of ServiceTerms table, since backporting
      
      * s/ServiceTerms/TermsOfService/ in tests
      
      * s/AcceptedServiceTermsId/AcceptedTermsOfServiceId/
      
      Change the model attribute, even though the column name will eventually be removed.
      
      * s/accepted_service_terms_id/accepted_terms_of_service_id/ to match redux
      
      * s/serviceTerms/termsOfService
      
      * rename column too, and add max size constraint
      
      * s/EnableCustomServiceTerms/EnableCustomTermsOfService
      bffcccf9
  7. 08 Oct, 2018 1 commit
  8. 03 Oct, 2018 1 commit
  9. 02 Oct, 2018 1 commit
  10. 26 Sep, 2018 2 commits
    • Harshil Sharma's avatar
      #MM-12130 changes for custom service terms (#9450) · af275fe9
      Harshil Sharma authored
      * #MM-12130 changes for custom service terms
      
      * Fixed styling
      
      * Added getServiceTerms API
      
      * removed unnecessary panic
      
      * removed custom service terms text from flat config
      
      * reverted user sql store as those changes are no longer needed
      
      * added tests
      
      * Updated a config key to be more standard
      
      * Added copyright info
      
      * Loading service terms only if the feature is enabled
      
      * Loading service terms only if the feature is enabled
      
      * removed unused index
      
      * added createservice termns API
      
      * made a param to bool instead of string
      
      * added createservice termns API
      
      * review fixes
      
      * fixed styling
      
      * Minor refactoring
      
      * removed saveConfig and loadConfig magic
      
      * added empty service terms text check to createServiceTerms API
      
      * refactoed some urls to be terms_of_service instead of service_terms
      
      * removed check for support settings
      
      * changed URLs in tests
      
      * removed unused code
      
      * fixed a bug
      
      * added service termd id in conif
      
      * fixed a test
      
      * review fixes
      
      * minor fixes
      
      * Fixed TestCreateServiceTerms
      af275fe9
    • Jesús Espino's avatar
      MM-7188: Cleaning push notification on every read, not only on channel switch (#9348) · 15d64fb2
      Jesús Espino authored
      * MM-7188: Cleaning push notification on every read, not only on channel switch
      
      * Removed unnecesary goroutine
      
      * Fixing tests
      
      * Applying suggestion from PR
      15d64fb2
  11. 17 Sep, 2018 1 commit
    • George Goldberg's avatar
      MM-11781: Basic Data Export Command Line. (#9296) · ab99f065
      George Goldberg authored
      * MM-11781: Basic Data Export Command Line.
      
      * ChannelStore new unit tests.
      
      * TeamStore new unit tests.
      
      * Unit test for new UserStore function.
      
      * Unit tests for post store new methods.
      
      * Review fixes.
      
      * Fix duplicate command name.
      ab99f065
  12. 13 Sep, 2018 1 commit
    • Jesse Hallam's avatar
      MM-11886: materialize channel search (#9349) · 8b17bf9e
      Jesse Hallam authored
      * materialize PublicChannels table
      
      Introduce triggers for each supported database that automatically maintain a subset of the Channels table corresponding to only public channels. This improves corresponding queries that no longer need to filter out 99% DM channels.
      
      This initial commit modifies the channel store directly for easier code reviewing, but the next wraps an experimental version around it to enable a kill switch in case there are unforeseen performance regressions.
      
      This addresses [MM-11886](https://mattermost.atlassian.net/browse/MM-11886) and [MM-11945](https://mattermost.atlassian.net/browse/MM-11945).
      
      * extract the experimental public channels materialization
      
      Wrap the original channel store with an experimental version that
      leverages the materialized public channels, but can be disabled to
      fallback to the original implementation.
      
      This addresses MM-11947.
      
      * s/ExperimentalPublicChannelsMaterialization/EnablePublicChannelsMaterialization/
      
      * simplify error handling
      
      * move experimental config listener until after store is initialized
      8b17bf9e
  13. 11 Sep, 2018 1 commit
  14. 24 Aug, 2018 1 commit
  15. 23 Aug, 2018 1 commit
  16. 08 Aug, 2018 1 commit
  17. 30 Jul, 2018 1 commit
    • Martin Kraft's avatar
      Pr 9039 (#9187) · 5872bf9c
      Martin Kraft authored
      * MM-11065: Allow to search and get archived channels from the API
      
      * Fixing more tests
      
      * Add some unit tests
      
      * Add includeDeleted parameter to session permissions check function
      
      * More test fixing
      
      * Adding archive channels list in channels search
      
      * Add restriction for archived channel edition
      
      * Reverting permissions checks modification
      
      * Changed the query parameter to include_deleted
      
      * Enable search archive channels as true by default
      
      * Adding tests for verify search on deleted channels
      
      * Allowing to override archive channels during the imports
      
      * Fixed test
      
      * Search in archive channels from the API must be explicitly requested
      
      * Removing includeDeleted parameter from GetChannelByName and GetChannelByNameForTeam
      
      * Back to ViewArchivedChannels config
      
      * Fixing tests
      
      * Reverting GetChannelByName parameter
      
      * Add include deleted parameter on GetChannel functions in plugins api
      
      * Fixing tests
      5872bf9c
  18. 27 Jun, 2018 1 commit
  19. 25 Jun, 2018 2 commits
  20. 21 Jun, 2018 1 commit
  21. 01 Jun, 2018 1 commit
  22. 17 May, 2018 1 commit
  23. 14 May, 2018 1 commit
    • George Goldberg's avatar
      MM-9728: Online migration for advanced permissions phase 2 (#8744) · 51bd710e
      George Goldberg authored
      * MM-9728: Online migration for advanced permissions phase 2
      
      * Add unit tests for new store functions.
      
      * Move migration specific code to own file.
      
      * Add migration state function test.
      
      * Style fixes.
      
      * Add i18n strings.
      
      * Fix mocks.
      
      * Add TestMain to migrations package tests.
      
      * Fix typo.
      
      * Fix review comments.
      
      * Fix up the "Check if migration is done" check to actually work.
      51bd710e
  24. 10 May, 2018 1 commit
  25. 03 May, 2018 1 commit
  26. 27 Apr, 2018 1 commit
    • Christopher Speller's avatar
      Structured logging (#8673) · 686c2fba
      Christopher Speller authored
      * Implementing structured logging
      
      * Changes to en.json to allow refactor to run.
      
      * Fixing global logger
      
      * Structured logger initalization.
      
      * Add caller.
      
      * Do some log redirection.
      
      * Auto refactor
      
      * Cleaning up l4g reference and removing dependancy.
      
      * Removing junk.
      
      * Copyright headers.
      
      * Fixing tests
      
      * Revert "Changes to en.json to allow refactor to run."
      
      This reverts commit fd8249e99bcad0231e6ea65cd77c32aae9a54026.
      
      * Fixing some auto refactor strangeness and typo.
      
      * Making keys more human readable.
      686c2fba
  27. 20 Apr, 2018 1 commit
    • George Goldberg's avatar
      MM-8796: Full implementation of "Schemes" in Store/Model/App layers. (#8357) · cd55c44c
      George Goldberg authored
      * Add Scheme model and stub store.
      
      * Port ChannelStore to be Scheme aware.
      
      * Make almost all the API/APP layer work with ChannelSchemes.
      
      Only thing still hacky is UpdateChannelMemberRoles().
      
      * Add basic SchemeStore implementation.
      
      * Migrate UpdateChannelMemberRoles properly and fix tests.
      
      * Update store tests and mocks so they work.
      
      * Include creating default roles in Scheme create store function.
      
      * Implement role deletion and start scheme deletion.
      
      * Only use non-deleted roles for authorization.
      
      * Add GetByScheme method to Team store.
      
      * Add GetChannelsByScheme.
      
      * Update store mocks.
      
      * Implement scheme deletion in the store.
      
      * Rename is valid function.
      
      * Add offset and limit to queries to fetch teams and channels by scheme.
      
      * Fix queries.
      
      * Implement scheme awareness in Team store and add a migration.
      
      * Tidy up ChannelStore mapping functions and add exhaustive unit tests.
      
      * Add all missing i18n.
      
      * Proper tests for TeamStore internal functions and fix them.
      
      * Make additional TeamMember fields nullable.
      
      * Make new ChannelMember fields nullable.
      
      * Create new nullable columns without defaults.
      
      * Make new fields in large tables nullalble.
      
      * Fix empty list of TeamMembers.
      
      * Deduplicate SQL queries.
      
      * Fix spelling.
      
      * Fix review comment.
      
      * More review fixes.
      
      * More review fixes.
      cd55c44c
  28. 18 Apr, 2018 1 commit
  29. 26 Mar, 2018 1 commit
    • Jesse Hallam's avatar
      Relax 4k post message limit (#8478) · 8491ba57
      Jesse Hallam authored
      * MM-9661: rename POST_MESSAGE_MAX_RUNES to \0_v1
      
      * MM-9661: s/4000/POST_MESSAGE_MAX_RUNES_V1/ in tests
      
      * MM-9661: introduce POST_MESSAGE_MAX_RUNES_V2
      
      * MM-9661: migrate Postgres Posts.Message column to TEXT from VARCHAR(4000)
      
      This is safe to do in a production instance since the underyling type is
      not changing. We explicitly don't do this automatically for MySQL, but
      also don't need to since the ORM would have already created a TEXT column
      for MySQL in that case.
      
      * MM-9661: emit MaxPostSize in client config
      
      This value remains unconfigurable at this time, but exposes the current
      limit to the client. The limit remains at 4k in this commit.
      
      * MM-9661: introduce and use SqlPostStore.GetMaxPostSize
      
      Enforce a byte limitation in the database, and use 1/4 of that value as
      the rune count limitation (assuming a worst case UTF-8 representation).
      
      * move maxPostSizeCached, lastPostsCache and lastPostTimeCache out of the global context and onto the SqlPostStore
      
      * address feedback from code review:
      
      * ensure sqlstore unit tests are actually being run
      * move global caches into SqlPostStore
      * leverage sync.Once to address a race condition
      
      * modify upgrade semantics to match new db semantics
      
      gorp's behaviour on creating columns with a maximum length on Postgres
      differs from MySQL:
      * Postgres
        * gorp uses TEXT for string columns without a maximum length
        * gorp uses VARCHAR(N) for string columns with a maximum length of N
      * MySQL
        * gorp uses TEXT for string columns with a maximum length >= 256
        * gorp uses VARCHAR(N) for string columns with a maximum length of N
        * gorp defaults to a maximum length of 255, implying VARCHAR(255)
      
      So the Message column has been TEXT on MySQL but VARCHAR(4000) on
      Postgres. With the new, longer limits of 65535, and without changes to
      gorp, the expected behaviour is TEXT on MySQL and VARCHAR(65535) on
      Postgres. This commit makes the upgrade semantics match the new database
      semantics.
      
      Ideally, we'd revisit the gorp behaviour at a later time.
      
      * allow TestMaxPostSize test cases to actually run in parallel
      
      * default maxPostSizeCached to POST_MESSAGE_MAX_RUNES_V1 in case the once initializer panics
      
      * fix casting error
      
      * MM-9661: skip the schema migration for Postgres
      
      It turns out resizing VARCHAR requires a rewrite in some versions of
      Postgres, but migrating VARCHAR to TEXT does not. Given the increasing
      complexity, let's defer the migration to the enduser instead.
      8491ba57
  30. 09 Mar, 2018 2 commits
    • Joram Wilander's avatar
    • Stephen Kiers's avatar
      MM-9274- Sort Users in Channel by status (#8181) · 302dae5b
      Stephen Kiers authored
      * sort by lastActivity
      
      * added status ordering to Users
      
      * sort offline before dnd
      
      * remove data not needed
      
      * added seperate call for when order=‘status’ is on GetUser request
      
      * remove PrintLn
      
      * styling fix
      
      * remove mistake
      
      * mistake 2
      
      * better comment
      
      * explicit if statemnt
      
      * writing tests
      
      * removed manually added mocks
      
      * generated mock
      
      * ICU-668 Added unit tests
      
      * style fix
      
      * sort by lastActivity
      
      * added status ordering to Users
      
      * sort offline before dnd
      
      * remove data not needed
      
      * added seperate call for when order=‘status’ is on GetUser request
      
      * remove PrintLn
      
      * styling fix
      
      * remove mistake
      
      * mistake 2
      
      * better comment
      
      * explicit if statemnt
      
      * writing tests
      
      * removed manually added mocks
      
      * generated mock
      
      * ICU-668 Added unit tests
      
      * style fix
      
      * reverse dnd and offline
      
      * Fixed app.SaveStatusAndBroadcast
      
      * Fixed incorrect merge
      
      * Fixing incorrect merge again
      302dae5b
  31. 05 Mar, 2018 1 commit
  32. 01 Mar, 2018 1 commit
    • Christian Hoff's avatar
      PLT-7567: Integration of Team Icons (#8284) · 2b3b6051
      Christian Hoff authored
      * PLT-7567: Integration of Team Icons
      
      * PLT-7567: Read replica workaround, upgrade logic moved, more concrete i18n key
      
      * PLT-7567: Read replica workaround, corrections
      
      * PLT-7567: upgrade correction
      2b3b6051
  33. 06 Feb, 2018 1 commit
    • George Goldberg's avatar
      XYZ-37: Advanced Permissions Phase 1 Backend. (#8159) · e1cd6461
      George Goldberg authored
      * XYZ-13: Update Permission and Role structs to new design.
      
      * XYZ-10: Role store.
      
      * XYZ-9/XYZ-44: Roles API endpoints and WebSocket message.
      
      * XYZ-8: Switch server permissions checks to store backed roles.
      
      * XYZ-58: Proper validation of roles where required.
      
      * XYZ-11/XYZ-55: Migration to store backed roles from policy config.
      
      * XYZ-37: Update unit tests to work with database roles.
      
      * XYZ-56: Remove the "guest" role.
      
      * Changes to SetDefaultRolesFromConfig.
      
      * Short-circuit the store if nothing has changed.
      
      * Address first round of review comments.
      
      * Address second round of review comments.
      e1cd6461
  34. 31 Jan, 2018 1 commit
  35. 23 Jan, 2018 1 commit
  36. 19 Jan, 2018 1 commit