1. 05 Mar, 2019 1 commit
    • Christopher Speller's avatar
      MM-12393 Server side of bot accounts. (#10378) · 06b579d1
      Christopher Speller authored
      * bots model, store and api (#9903)
      
      * bots model, store and api
      
      Fixes: MM-13100, MM-13101, MM-13103, MM-13105, MMM-13119
      
      * uncomment tests incorrectly commented, and fix merge issues
      
      * add etags support
      
      * add missing licenses
      
      * remove unused sqlbuilder.go (for now...)
      
      * rejig permissions
      
      * split out READ_BOTS into READ_BOTS and READ_OTHERS_BOTS, the latter
      implicitly allowing the former
      * make MANAGE_OTHERS_BOTS imply MANAGE_BOTS
      
      * conform to general rest api pattern
      
      * eliminate redundant http.StatusOK
      
      * Update api4/bot.go
      Co-Authored-By: default avatarlieut-data <jesse.hallam@gmail.com>
      
      * s/model.UserFromBotModel/model.UserFromBot/g
      
      * Update model/bot.go
      Co-Authored-By: default avatarlieut-data <jesse.hallam@gmail.com>
      
      * Update model/client4.go
      Co-Authored-By: default avatarlieut-data <jesse.hallam@gmail.com>
      
      * move sessionHasPermissionToManageBot to app/authorization.go
      
      * use api.ApiSessionRequired for createBot
      
      * introduce BOT_DESCRIPTION_MAX_RUNES constant
      
      * MM-13512 Prevent getting a user by email based on privacy settings (#10021)
      
      * MM-13512 Prevent getting a user by email based on privacy settings
      
      * Add additional config settings to tests
      
      * upgrade db to 5.7 (#10019)
      
      * MM-13526 Add validation when setting a user's Locale field (#10022)
      
      * Fix typos (#10024)
      
      * Fixing first user being created with system admin privilages without being explicity specified. (#10014)
      
      * Revert "Support for Embeded chat (#9129)" (#10017)
      
      This reverts commit 3fcecd52.
      
      * s/DisableBot/UpdateBotActive
      
      * add permissions on upgrade
      
      * Update NOTICE.txt (#10054)
      
      - add new dependency (text)
      - handle switch to forked dependency (go-gomail -> go-mail)
      - misc copyright owner updates
      
      * avoid leaking bot knowledge without permission
      
      * [GH-6798] added a new api endpoint to get the bulk reactions for posts (#10049)
      
      * 6798 added a new api to get the bulk reactions for posts
      
      * 6798 added the permsission check before getting the reactions
      
      * GH-6798 added a new app function for the new endpoint
      
      * 6798 added a store method to get reactions for multiple posts
      
      * 6798 connected the app function with the new store function
      
      * 6798 fixed the review comments
      
      * MM-13559 Update model.post.is_valid.file_ids.app_error text per report (#10055)
      
      Ticket: https://mattermost.atlassian.net/browse/MM-13559
      Report: https://github.com/mattermost/mattermost-server/issues/10023
      
      * Trigger Login Hooks with OAuth (#10061)
      
      * make BotStore.GetAll deterministic even on duplicate CreateAt
      
      * fix spurious TestMuteCommandSpecificChannel test failure
      
      See
      https://community-daily.mattermost.com/core/pl/px9p8s3dzbg1pf3ddrm5cr36uw
      
      * fix race in TestExportUserChannels
      
      * TestExportUserChannels: remove SaveMember call, as it is redundant and used to be silently failing anyway
      
      * MM-13117: bot tokens (#10111)
      
      * eliminate redundant Client/AdminClient declarations
      
      * harden TestUpdateChannelScheme to API failures
      
      * eliminate unnecessary config restoration
      
      * minor cleanup
      
      * make TestGenerateMfaSecret config dependency explicit
      
      * TestCreateUserAccessToken for bots
      
      * TestGetUserAccessToken* for bots
      
      * leverage SessionHasPermissionToUserOrBot for user token APIs
      
      * Test(Revoke|Disable|Enable)UserAccessToken
      
      * make EnableUserAccessTokens explicit, so as to not rely on local config.json
      
      * uncomment TestResetPassword, but still skip
      
      * mark assert(Invalid)Token as helper
      
      * fix whitespace issues
      
      * fix mangled comments
      
      * MM-13116: bot plugin api (#10113)
      
      * MM-13117: expose bot API to plugins
      
      This also changes the `CreatorId` column definition to allow for plugin
      ids, as the default unless the plugin overrides is to use the plugin id
      here. This branch hasn't hit master yet, so no migration needed.
      
      * gofmt issues
      
      * expunge use of BotList in plugin/client API
      
      * introduce model.BotGetOptions
      
      * use botUserId term for clarity
      
      * MM-13129 Adding functionality to deal with orphaned bots (#10238)
      
      * Add way to list orphaned bots.
      
      * Add /assign route to modify ownership of bot accounts.
      
      * Apply suggestions from code review
      Co-Authored-By: default avatarcrspeller <crspeller@gmail.com>
      
      * MM-13120: add IsBot field to returned user objects (#10103)
      
      * MM-13104: forbid bot login (#10251)
      
      * MM-13104: disallow bot login
      
      * fix shadowing
      
      * MM-13136 Disable user bots when user is disabled. (#10293)
      
      * Disable user bots when user is disabled.
      
      * Grammer.
      Co-Authored-By: default avatarcrspeller <crspeller@gmail.com>
      
      * Fixing bot branch for test changes.
      
      * Don't use external dependancies in bot plugin tests.
      
      * Rename bot CreatorId to OwnerId
      
      * Adding ability to re-enable bots
      
      * Fixing IsBot to not attempt to be saved to DB.
      
      * Adding diagnostics and licencing counting for bot accounts.
      
      * Modifying gorp to allow reading of '-' fields.
      
      * Removing unnessisary nil values from UserCountOptions.
      
      * Changing comment to GoDoc format
      
      * Improving user count SQL
      
      * Some improvments from feedback.
      
      * Omit empty on User.IsBot
      06b579d1
  2. 10 Jan, 2019 1 commit
    • Martin Kraft's avatar
      Ldap groups phase1 (#9752) · 6d30b21d
      Martin Kraft authored
      * Initial models, API, app, and persistence of groups and group syncing.
      
      * Consistent letter casing in ldif.
      
      * Moves group-specific migrations into func.
      
      * Adds API endpoint to retrieve LDAP groups (and associated MM groups) one tree level at a time.
      
      * Adds mattermost group id to SCIMGroup (if available).
      
      * Splits user and group creation so that memberOf works. Returns users from ldap interface.
      
      * Updates method name.
      
      * Returns users IDs instead of User.
      
      * Removes non-essential group data.
      
      * MM-11807: Add GroupFilter to LDAP config. (#9513)
      
      * MM-11807: Add GroupFilter to LDAP config.
      
      * Add diagnostic.
      
      * Adds new config option for using 'memberOf' overlay.
      
      * Adds API endpoint to link a group.
      
      * Removes debug statements.
      
      * Adds unlink group API endpoint.
      
      * Fix to LDAP API. Adds API method to client4 and app.
      
      * Adds some missing app methods. Renames API unexported func.
      
      * Fixes link/unlink API path to accept valid DNs.
      
      * Allow any character for DN portion of path.
      
      * Switches from DN to objectGUID or entryUUID as the remote identifier linking LDAP groups to MM groups.
      
      * Formatting.
      
      * Formatting.
      
      * Setting group name field to an ID for phase 1.
      
      * Adds an LDAP config field to Setting up configuration for local LDAP.
      
      * Changes to LDAP and GroupStore interfaces.
      
      * Draft of nesting groups in API response.
      
      * Removes unnecessary tree models.
      
      * Updates group membershipt create store method to also restore.
      
      * Adds new config to test config.
      
      * Accept AD format length.
      
      * Switches to SetUniqueTogether method.
      
      * Updates revert.
      
      * Tweaks to syncing queries .
      
      * Updates query for pending team and channel memberships.
      
      * Removes old GroupSyncableScanner usage. Some formatting and renaming.
      
      * Fixes bug setting syncable type in selecting paged.
      
      * Adds tests for syncables populator.
      
      * Only add users to teams and channels that are not deleted.
      
      * Renames method.
      
      * Updates test LDAP setup.
      
      * Removes memberof config stuff.
      
      * Renames.
      
      * Updates test data.
      
      * Fix for gofmt.
      
      * Adds missing license.
      
      * Adds missing teardowns.
      
      * Test fix.
      
      * Adds a cycle to the groups test data.
      
      * Changes API to return flat list.
      
      * Removes some unused interface and app methods.
      
      * Returns empty braces if results are empty.
      
      * Adds more LDAP test data.
      
      * Fix for test data error.
      
      * Adds error.
      
      * Moves test groups.
      
      * Adds OU for load test data.
      
      * Moves load test ou creation to load data.
      
      * Adds a new bool flag to SCIMGroups.
      
      * Removes SCIMGroup completely.
      
      * Removes FULL JOIN because it is not supported in MySQL.
      
      * Adds tests for sync queries; renames constant.
      
      * Bad merge fix.
      
      * Vet fix.
      
      * Returning OK on delete ldap group link
      
      * Removes foreign key constraints.
      
      * Adding total to the ldap getAllGroups api endpoint
      
      * Adds get group members page.
      
      * Removes pagination from groups syncables list API.
      
      * Adding syncable check now that foreign key constraint is removes.
      
      * Joins teams and channels to group syncables.
      
      * Adds group member count.
      
      * Adding GetAllChannels and SearchAllChannels for system admins only
      
      * Fix.
      
      * Test fix from pagination removal.
      
      * Orders groupmembers by createat.
      
      * Fixing search of all channels
      
      * Test fix after removing pagination.
      
      * JSON syntax error fix.
      
      * Changing tests (for now) pending investigation.
      
      * Adding GetAllChannels and SearchAllChannels tests for the store
      
      * Adding GetAllChannels and SearchAllChannels API tests
      
      * Omit empty JSON values of group syncables.
      
      * Fixing GetAllChannels and SearchAllChannels tests
      
      * Fixing GetAllChannels and SearchAllChannels store tests
      
      * Fixing GetAllChannels api tests
      
      * Adds 'LDAP groups' feature flag. (#9861)
      
      * Migrate new client functions to idiomatic error handling
      
      * Test fixes.
      
      * Simplification of groups api (#9860)
      
      * Simplification of groups api
      
      * Fixing RequireSyncableType
      
      * Test fix.
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Update api4/group.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Fix copy/paste error.
      
      * Fix copy/paste error.
      
      * Adds missing return, changes to correct HTTP status code.
      
      * Adds missing return, changes status codes.
      
      * Check for license.
      
      * Renames variable for new signature.
      
      * Adds client method to get a group.
      
      * Adds client method and tests for PatchGroup.
      
      * Adds more API tests.
      
      * Adds groups API tests.
      
      * Adds client method and tests for getting group syncables.
      
      * Adds tests for patching group teams and channels.
      
      * Update to translations.
      
      * Removes test.
      
      * Fix incorrect conditional.
      
      * Removes unnecessary nil check.
      
      * Removes unnecessary return.
      
      * Updates comment, removes unused variable.
      
      * Uses consistent JSON unmarshal pattern.
      
      * Uses consistent JSON unmarshal pattern.
      
      * Moves const block.
      
      * Switches 'already linked' from error to success response.
      
      * Removes commented-out code.
      
      * Switched to status ok.
      
      * Add parens for readability.
      
      * Fix copy/paste error.
      
      * Unexport some structs.
      
      * Removes repeated validity check.
      
      * Return without attempting commit if there's a rollback.
      
      * Fix incorrect HTTP status code.
      
      * Update store/sqlstore/group_supplier.go
      Co-Authored-By: default avatarmkraft <martinkraft@gmail.com>
      
      * Adds utility methods for going from groupsyncable to groupteam and groupchannel.
      
      * Fixing george suggestions (#9911)
      
      * Test fix.
      
      * Adds QA data to VC with visualization.
      
      * Fixes typo in graph image.
      
      * Update display name when re-linking in case it has changed in LDAP.
      
      * Adds ability to configure group display name and unique identifier. (#9923)
      
      * Adds ability to configure group display name and unique identifier.
      
      * Adds some configs to confi-ldap make command.
      
      * Fix for move of session.
      
      * Exposes method for use by SAML package.
      
      * Switches GroupSyncableType from int to string.
      
      * Update Jenkins build files.
      
      * Removes unused variable assignment.
      
      * Removes old unnecessary early return.
      
      * Removes unnecessary variable.
      
      * Moves param parsing before license and permissions checks.
      
      * Removes old code.
      
      * Compares agains underlying error rather than error id.
      
      * Switches tests to assertions.
      
      * Adds more assertions.
      
      * Adds missing return.
      
      * Adds space after comma for added legibility.
      
      * Moves a view model to the api package.
      
      * Unexports method.
      
      * Uses id validator function.
      
      * Fix docker-compose flag.
      
      * Typo fix.
      
      * Moves index creation to supplier.
      
      * Removes bad merge.
      
      * Renames parameter.
      
      * Re-adds space.
      
      * Removes unnecessary transaction.
      
      * Escapes the Groups table name with backticks because it is a reserved keyword.
      
      * Fix roles cache bug
      
      * Removing unnecesiary deserializing function
      
      * Switches table name rather than custom SQL everywhere for Postgres without backticks.
      
      * Removes redundant check for sql.ErrNoRows.
      
      * Removes redundant check for sql.ErrNoRows.
      
      * Removes data integrity check and redundant nil conditional.
      
      * Removes redundant check for sql.ErrNoRows.
      
      * Removes unnecessary query.
      
      * Removes ID length validation from persistence tier.
      
      * Makes some supplier methods idempotent.
      
      * Removes some empty switch defaults.
      
      * Renames Group Type field to Source.
      
      * Fix for mistaken field name change.
      
      * Uses IsValidId function.
      
      * Removes comment.
      
      * Changes json key name.
      
      * Removes test because no longer validating user.
      
      * Moves model state validation to app layer.
      
      * Don't create Groups.CanLeave column until phase 2.
      
      * Removes state validation until properties are used in phase 2.
      
      * Removes duplicated check.
      
      * Removes state validation until properties are used in phase 2.
      
      * Removes some tests until phase 2.
      
      * Comment-out a bunch of test related to CanLeave.
      
      * Extra unmarshal validation check. Removes more code for CanLeave.
      
      * Removes tests for CanLeave.
      
      * Explict error msg.
      
      * Rewrite queries.
      
      * Changes index name. Adds index.
      
      * Removes assertion.
      
      * Adds experimental feature flag.
      6d30b21d
  3. 05 Dec, 2018 1 commit
  4. 28 Nov, 2018 1 commit
  5. 06 Jul, 2018 1 commit
  6. 21 Jun, 2018 1 commit
    • Jesse Hallam's avatar
      MM-10370: serve subpath (#8968) · dd35ad43
      Jesse Hallam authored
      * factor out GetSubpathFromConfig
      
      * mv web/subpath.go to utils/subpath.go
      
      * serve up web, api and ws on /subpath if configured
      
      * pass config to utils.RenderWeb(App)?Error
      
      This allows the methods to extract the configured subpath and redirect
      to the appropriate `/subpath/error` handler.
      
      * ensure GetSubpathFromConfig returns trailing slashes deterministically
      
      * fix error 404 handling
      
      * redirect /subpath to /subpath/
      
      This is necessary for the static handler to match, otherwise none of the
      registered routes find anything. This also makes it no longer necessary
      to add trailing slashes in the root router.
      dd35ad43
  7. 01 Jun, 2018 1 commit
  8. 14 May, 2018 1 commit
    • Joram Wilander's avatar
      Refactor context out of API packages (#8755) · 47250c66
      Joram Wilander authored
      * Refactor context out of API packages
      
      * Update function names per feedback
      
      * Move webhook handlers to web and fix web tests
      
      * Move more webhook tests out of api package
      
      * Fix static handler
      47250c66
  9. 03 May, 2018 1 commit
  10. 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
  11. 02 Apr, 2018 1 commit
  12. 29 Mar, 2018 1 commit
  13. 21 Feb, 2018 1 commit
  14. 20 Feb, 2018 1 commit
  15. 06 Feb, 2018 2 commits
    • Chris's avatar
    • 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
  16. 31 Jan, 2018 1 commit
  17. 11 Jan, 2018 1 commit
  18. 05 Jan, 2018 1 commit
  19. 23 Nov, 2017 1 commit
  20. 25 Oct, 2017 1 commit
    • Christopher Speller's avatar
      Performance improvements for 40M posts (#7708) · 4491b5ec
      Christopher Speller authored
      * Optimizing get root posts SQL query
      
      * Setting session invalidation to be reliable
      
      * Adding app reciever to SessionHasPermissionToUser
      
      * Adding app reciever to SessionHasPermissionToTeam
      
      * Adding app reciever to SessionHasPermissionTo
      
      * Clear session cache if permission was denied
      
      * Fixing rebase issues
      
      * Revert "Optimizing get root posts SQL query"
      
      This reverts commit f364757e7015cfb4ec673d0a4fc3d57cd25d8dd7.
      
      * Fixing build
      4491b5ec
  21. 18 Oct, 2017 1 commit
    • Chris's avatar
      Reduce utils.Cfg references (#7650) · 8e19ba02
      Chris authored
      * app.UpdateConfig method
      
      * test fix
      
      * another test fix
      
      * the config override option as-was is just error prone, remove it for now
      
      * derp
      8e19ba02
  22. 03 Oct, 2017 1 commit
  23. 28 Sep, 2017 1 commit
  24. 22 Sep, 2017 1 commit
  25. 19 Sep, 2017 1 commit
  26. 07 Sep, 2017 1 commit
  27. 06 Sep, 2017 1 commit
  28. 01 Sep, 2017 1 commit
    • Joram Wilander's avatar
      Implement experimental REST API endpoints for plugins (#7279) · 899ab31f
      Joram Wilander authored
      * Implement experimental REST API endpoints for plugins
      
      * Updates per feedback and rebase
      
      * Update tests
      
      * Further updates
      
      * Update extraction of plugins
      
      * Use OS temp dir for plugins instead of search path
      
      * Fail extraction on paths that attempt to traverse upward
      
      * Update pluginenv ActivePlugins()
      899ab31f
  29. 31 Aug, 2017 1 commit
  30. 29 Aug, 2017 1 commit
  31. 16 Aug, 2017 1 commit
  32. 31 Jul, 2017 1 commit
  33. 14 Jul, 2017 1 commit
  34. 27 Jun, 2017 1 commit
  35. 20 Jun, 2017 1 commit
  36. 19 Jun, 2017 1 commit
    • Corey Hulen's avatar
      PLT-6080 moving clustering to memberlist (#6499) · 36f216cb
      Corey Hulen authored
      * PLT-6080 adding cluster discovery service
      
      * Adding memberlist lib
      
      * Adding memberlist lib
      
      * WIP
      
      * WIP
      
      * WIP
      
      * WIP
      
      * Rolling back config changes
      
      * Fixing make file
      
      * Fixing config for cluster
      
      * WIP
      
      * Fixing system console for clustering
      
      * Fixing default config
      
      * Fixing config
      
      * Fixing system console for clustering
      
      * Tweaking hub setting
      
      * Bumping up time
      
      * merging vendor dir
      
      * Updating vendor dir
      
      * Fixing unit test
      
      * Fixing bad merge
      
      * Remove some testing code
      
      * Moving comment
      
      * PLT-6868 adding db ping retry
      
      * Removing unused loc strings
      
      * Adding defer to cancel
      36f216cb
  37. 18 May, 2017 1 commit
    • Harrison Healey's avatar
      PLT-6408 Framework for job server (#6404) · 577ed27f
      Harrison Healey authored
      * Added initial job server
      
      * Added job server to be ran as part of platform
      
      * Added test job to the enterprise repo
      
      * Fixed job server not loading license
      
      * Renamed job package to jobs
      
      * Fixed TE not being buildable
      
      * Added JobStatus table to database
      
      * Changed fields used by JobStatus
      
      * Added APIs to query job status
      
      * Added config change listener to server
      
      * Added option to run job server from Makefile
      
      * Added ability to enable/disable jobs from config
      
      * Commented out placeholder for search indexing job
      
      * Fixed govet
      
      * Removed debug messages and fixed job api init message
      577ed27f
  38. 09 May, 2017 1 commit
  39. 28 Apr, 2017 1 commit