Commit Graph

489 Commits

Author SHA1 Message Date
Doug Lauder
218d901b0d
Sqlite in-memory database for unit tests (#2599)
* unit tests use in-memory DB for sqlite
2022-03-23 14:14:07 -04:00
Harshil Sharma
d1b7e601c5 Added server changes to support private templates 2022-03-23 16:21:48 +05:30
Jesús Espino
aa540e73ce
Permissions feature branch (#2578)
* wip

* Added data migration for populating categories

* wip

* Added data migration for populating categories

* Store WIP

* migration WIP

* category CRUD APIs complete

* category block API WIP

* block category update API done

* Fetcehed data into store

* Started displayting sidebar data

* sidebar WIP

* Dashboard - basic changes

* Sidebar dashboard btn and board switcher UI only

* Sidebar dashboard btn and board switcher UI only

* create category dialog WIP

* Create category webapp side done

* Integrated move card to other category

* board to block

* Disabled dashboard route for now as we'll implement it in phase 2

* WIP

* Added logic to open last board/view on per team level

* Add workspace to teams and boards migrations (#1986)

* Add workspace to teams and boards migrations

* Update json annotations on board models

* boards search dialog WIP

* Seach dialog WIP

* Implemented opening boiard from search results

* Boards switcher styliung

* Handled update category WS event

* Template support

* personal server support and styling fixes

* test fix WIP

* Fixed a bug causing boards to not be moved correctly beteen categories

* Fixed webapp tests

* fix

* Store changes (#2011)

* Permissions phase 1 - Websocket updates (#2014)

* Store changes

* Websockets changes

* Permissions phase 1 - Permissions service (#2015)

* Store changes

* Websockets changes

* Permissions service

* Api and app updates (#2016)

* Store changes

* Websockets changes

* Permissions service

* New API and App changes

* Delete and Patch boards and blocks endpoints

* Used correct variable

* Webapp changes WIP

* Open correct team URL

* Fixed get block API

* Used React context for workspace users

* WIP

* On load navigation sorted out

* WIP

* Nav fix

* categories WS broadcast

* Used real search API

* Fixed unfurl ppreview

* set active team in sidebar

* IMplemented navigation on changing team in sidebar

* Misc fixes

* close rows inside transaction (#2045)

* update syntax for mysql (#2044)

* Upadted mutator for new patchBlock API

* Updated patchBlock API to use new URL

* Listeining to correct event in plugin mode

* Implemented WS messages for category operations:

* Fix duplicated build tags on Makefile

* Sidebar enhancements

* Add missing prefix to SQLite migration and fix flaky tests

* Sidebar boards menu enhancement

* Fix board page interactions (#2144)

* Fix patch board card properties error

* Fix board interactions

* Fix insert blocks interactions

* Fix app tests (#2104)

* Add json1 tag to vscode launch (#2157)

* Fix add, delete and update boards and add board patch generation (#2146)

* Fix update boards and add board patch generation

* Make add board and add template work, as well as deleting a board

* Update the state on board deletion

* Delete unused variable

* Fix bad parenthesis

* Fix board creation inside plugin, options were coming null due websocket message serialization

* update property type mutators to use boards API (#2168)

* Add permissions modal (#2196)

* Initial integration

* Permissions modal, websocket updates and API tests implemented

* Avoid updating/removing user if there is only one admin left

* Fix duplicates on board search

* Adds integration test

* Addressing PR review comments

Co-authored-by: Jesús Espino <jespinog@gmail.com>

* Merge

* I'm able to compile now

* Some fixes around tests execution

* Fixing migrations

* Fixing migrations order

* WIP

* Fixing some other compilation problems on tests

* Some typescript tests fixed

* Fixing javascript tests

* Fixing compilation

* Fixing some problems to create boards

* Load the templates on initial load

* Improvements over initial team templates import

* Adding new fields in the database

* Working on adding duplicate board api

* Removing RootID concept entirely

* Improving a bit the subscriptions

* Fixing store tests for notificationHints

* Fixing more tests

* fixing tests

* Fixing tests

* Fixing tests

* Fixing some small bugs related to templates

* Fixing registration link generation/regeneration

* Fixing cypress tests

* Adding store tests for duplicateBoard and duplicateBlock

* Addressing some TODO comments

* Making the export api simpler

* Add redirect component for old workspace urls

* Removing Dashboard code

* Delete only the built-in templates on update

* fixing tests

* Adding users autocompletion

* Updating snapshots

* Fixing bad merge

* fix panic when creating new card in notifysubscriptions (#2352)

* fix lint errors (#2353)

* fix lint errors

* fix panic when creating new card in notifysubscriptions (#2352)

* fix lint errors

* fix unit test

* Revert "fix unit test"

This reverts commit 0ad78aed65.

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* fix sql syntax error for SearchUsersByTeam (#2357)

* Fix mentions delivery (#2358)

* fix sql syntax error for SearchUsersByTeam

* fix mentions delivery

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* update api for octoClient calls, pass correct variables to mutator (#2359)

* Fixing tests after merge

* Fix sidebar context menu UI issue (#2399)

* Fix notification diff for text blocks (#2386)

* fix notification diff for text blocks; fix various linter errors.

* fix URLs to cards

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Permissions branch: Fix card links (#2391)

* fix notification diff for text blocks; fix various linter errors.

* fix URLs to cards

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fixing sqlite tests

* Fixing server tests

* Update migrations to create global templates. (#2397)

* fix duplicate templates

* revert migrate.go

* update UI for empty templates

* implement updating built-in templates as global (teamId = 0)

* handle error if board not found

* update unit test

* fix more tests

* Update blocks_test.go

Fix merge issue

* fix migration sql error (#2414)

* Fixing frontend tests

* Set target team ID when using a global template (#2419)

* Fix some server tests

* Fixing onboarding creation

* Permissions branch: Fix unit tests and CI errors (part 1) (#2425)

* Fixing some small memory leaks (#2400)

* Fixing some small memory leaks

* fixing tests

* passing the tags to all test targets

* Increasing the timeout of the tests

* Fix some type checkings

* Permissions branch: Fixes all the linter errors (#2429)

* fix linter errors

* Reestructuring the router and splitting in more subcomponents (#2403)

* Reestructuring the router and splitting in more subcomponents

* Removing console.log calls

* Removing unneeded selector

* Addressing PR comment

* Fix redirection to one team when you load directly the boards home path

* Using properly the lastTeamID to redirect the user if needed

* don't allow last admin change/deleted (#2416)

* don't allow last admin change/deleted

* update for i18-extract

* fixed en.json

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>

* Splitting BoardPage component into simpler/smaller components (#2435)

* Splitting BoardPage component into simpler/smaller components

* Removing unneeded import

* Replace go migrate with morph permissions (#2424)

* merge origin/replace-go-migrate-with-morph

* run go mod tidy on mattermost-plugin and increase test timeout

* fix merge issue temprorarily

* remove some debug changes

* fixing the linter

* Allow always team 0 (global) templates fetch (#2472)

* Fix problem with viewId 0 in the URL (#2473)

* Migrate from binddata to goembed (#2471)

* Adding join logic to the board switcher (#2434)

* Adding join logic to the board switcher

* Using already existing client function and removing the joinBoard one

* Adding support for autojoin based on url

* Fixing frontend tests

* fix webapp compile error, missing enableSharedBoards (#2501)

* Fixing duplication on postgres

* Adding back views to the sidebar (#2494)

* Fix #2507. Update Swagger comments (#2508)

* Fix the flash of the template selector on board/team switch (#2490)

* Fix the flash of the template selector on board/team switch

* More fixes specially around error handling

* Fixing the bot badge (#2487)

* simplifying a bit the team store sync between channels and focalboard (#2481)

* Fix menu tests (#2528)

* fix failing menu tests

* fix lint error

* Added keyboard shortcut for boards switcher (#2407)

* Added keyboard shortcut for boards switcher

* Fixed a type error

* Added some inline comments

* Fixed lint

* Fixed bug with scroll jumping when the card is opened: (#2477)

- avoid remounting of `ScrollingComponent` for each render of `Kanban` component
  - property `autoFocus` set to false for `CalculationOptions` because it triggers `blur` even for the button in Jest tests and closes the menu
  - snapshots for tests with `CalculationOptions` updated

* Adding the frontend support for permissions and applying it to a big part of the interface. (#2536)

* Initial work on permissions gates

* Applying permissions gates in more places

* Adding more checks to the interface

* Adding more permissions gates and keeping the store up to date

* fixing some tests

* Fixing some more tests

* Fixing another test

* Fixing all tests and adding some more

* Adding no-permission snapshot tests

* Addressing PR review comments

* Fixing invert behavior

* Permissions branch:  No sqlstore calls after app shutdown (#2530)

* fix webapp compile error, missing enableSharedBoards

* refactor app init wip

* - ensure all block change notifications are finished before shutting down app
- fix unit tests for mysql (insert_at only has 1 second resolution!)

* adjust logging

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fixed migrations to allow upgrading from previous version (#2535)

* Added mechanism to check if schema migration is needed

* WIP

* WIP

* WIP

* WIP

* Fixed migration

* Fixed for SQLite

* minor cleaniup

* Deleted old schema migration table after running migrations

* Removed a debug log

* Fixed a bug where the code always tried to delete a table which may or may not exist

* Show properly the user avatar in the ShareBoard component (#2542)

* Fixing the last CI problems from the permissions-branch (#2541)

* Fix history ordering

* Giving some times to avoid possible race conditions

* Empty

* Reverting accidental change in the config.json

* Optimizing table view (#2540)

* Optimizing table view

* Reducing the amount of rendering for tables

* Some other performance improvements

* Improve the activeView updates

* Some extra simplifications

* Another small improvement

* Fixing tests

* Fixing linter errors

* Reducing a bit the amount of dependency with big objects in the store

* Small simplification

* Removing Commenter role from the user role selector (#2561)

* Shareboard cleanup (#2550)

* Initial work on permissions gates

* Applying permissions gates in more places

* Adding more checks to the interface

* Adding more permissions gates and keeping the store up to date

* fixing some tests

* Fixing some more tests

* Fixing another test

* Fixing all tests and adding some more

* Adding no-permission snapshot tests

* Addressing PR review comments

* cleanup some shareboard settings

* remove unused property, fix for user items being displayed for non admin

* revert change, allow users to show

Co-authored-by: Jesús Espino <jespinog@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fixing comments and cards with the new optimizations in the store (#2560)

* Fixing property creation (#2563)

* Fix user selection in table view (#2565)

* Fixing focus new row in table view (#2567)

* Permissions branch: Fix sqlite table lock (CI) (#2568)

* fix sqlite table lock

* remove test db on teardown

* revert .gitignore

* fix goimport on migration code

* fix typo

* more linter fixes

* clean up tmp db for sqlstore tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Fixing snapshots

* Migrating center panel to functional component (#2562)

* Migrating center panel to functional component

* Fixing some tests

* Fixing another test

* Fixing linter errors

* Fixing types errors

* Fixing linter error

* Fixing cypress tests

* Fixing the last cypress test

* Simpliying a bit the code

* Making property insertion more robust

* Updating checkbox test

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Chen-I Lim <46905241+chenilim@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: kamre <eremchenko@gmail.com>
2022-03-22 08:24:34 -06:00
Harshil Sharma
a30fef5848
Fixed a bug where images of the welcome board were not copied over. (#2453)
* Fixed a buig where images of welcome board were not copied over

* Lint fixes

* Fixed test

* Fixed test
2022-03-08 11:30:49 +05:30
Akshay Vasudeva Rao
68819185a4
Shows "(Deleted User)" instead of UUID when user not found (#2354)
* Shows "(Deleted User)" instead of long, unreadable UUID in case the user is not found

In case a user is not found, at present unreadable and long UUIDs are shown which kill the look and feel of the application. This patch replaces the UUID with a more explanatory string.

* Update server/services/store/mattermostauthlayer/mattermostauthlayer.go

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-03-03 12:38:04 -07:00
Scott Bishel
b41fd7b4e8
update to v0.16.0 (#2438) 2022-03-02 15:08:40 -07:00
Harshil Sharma
ab3bf6312c
Merge Onboarding feature branch into main (#2406)
* Persistent user config (#2133)

* Added user config API

* Add unit tests

* lint fix

* Fixed webapp tests

* Fixed webapp tests

* Updated props in store after updating

* Minor fixes

* Removed redundent data from audit logs

* Onboarding Tour (#2287)

* Created private board

* Roughly displayed tour

* Synced with Dhama's changes

* WIP

* Trying to add GIF

* Added 3 tour steps

* WIP

* WIP

* WIP

* checked in missed file

* Synced with feature branch

* WIp

* Adde skip tour option

* Fixed image loading for on-prem

* Made tour work on presonal server:

* Adde missed file

* Adding telemetry

* Adding telemetry

* Added tour tip telemetry

* Fixed pulsating dot styling for personal server

* reverted personal config

* Added reset tour button

* Displayed share tour tip of feature is enabled

* Lint fixes

* Fixed webapp tests

* Fixed webapp tests

* Completed webapp tests

* Completed webapp tests

* Webapp lint fixes

* Added server tests

* Testing cypress skip tour fix

* Fixed Cypress tests

* Added share board tour step

* Added share board tour step

* webapp lint fixes

* Updated logic to pick welcome board

* Updated tests:

* lint fixes

* Updating UI changes

* Fixed a bug causing card tour to re-appear

* FIxed minor issue

* FIxed bug where card tour didn't start in clickingh on card

* Fixed tests

* Make update user props use string instead of interface

* Fixed a value type

* Updating gif size

* Updating resolution breakpoint

* Updating tutorial tip

* Updating view selector

* Refactored tour components

* Misc fixes

* minor refactoring

* GH-2258: allow date range to overflow (#2268)

* allow date range to overflow

* Fixed issue with date overflowing into neighbouring column

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Update readme with accurate Linux standalone app build instructions (#2351)

* Bump follow-redirects from 1.14.7 to 1.14.8 in /experiments/webext (#2339)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Switch component style fixed: selector specificity increased by adding additional class. (#2179)

* Adding sever side undelete endpoint (#2222)

* Adding sever side undelete endpoint

* Removing long lines golangci-lint errors

* Fixing linter errors

* Fixing a test problem

* Fixing tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>

* Removing transactions from sqlite backend (#2361)

* Removing transactions from sqlite backend

* Skipping tests in sqlite because the lack of transactions

* Generating the mocks

* Fixing golangci-lint

* Fixing problem opening the tour tooltip on card open

* Fixing texts missmatch

* Adding the Product Tour entry in the user settings menu

* Fixing some tests

* Fixing tests

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kamre <eremchenko@gmail.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>

* Restored package json

* Restored package json

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kamre <eremchenko@gmail.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2022-02-28 12:28:16 +01:00
Jesús Espino
1d5583ac7a
Removing transactions from sqlite backend (#2361)
* Removing transactions from sqlite backend

* Skipping tests in sqlite because the lack of transactions

* Generating the mocks

* Fixing golangci-lint
2022-02-22 14:30:47 -07:00
Jesús Espino
8d94422d5f
Adding sever side undelete endpoint (#2222)
* Adding sever side undelete endpoint

* Removing long lines golangci-lint errors

* Fixing linter errors

* Fixing a test problem

* Fixing tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-22 18:42:49 +01:00
Doug Lauder
d4133ec9d9
fix cardOrder when modifying block ids (#2345) 2022-02-16 12:08:49 -05:00
Chen-I Lim
03c240c799
API Readme: Add note on Boards API usage. (#2293) 2022-02-08 10:58:24 -08:00
Doug Lauder
2c21906164
Reduce noise in logs (#2256)
* use PluginLogAdapter to log everything; move some info to debug
2022-02-07 18:04:24 -05:00
Doug Lauder
870c56e6b3
Copy images when duplicating card/board (#2253)
* copy image for card/board dup

* revert store changes

* revert store changes
2022-02-04 15:12:28 -07:00
Scott Bishel
50d62db683
Update to version 0.15.0 (#2231)
* update to version 0.15.0

* update month

* update snapshots

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-04 11:21:33 -07:00
Doug Lauder
a47baf7f23
Multi version archive import (#2220)
* Fixed panic in PropDef.GetValue for `person` property types.
- the GetUserByID API can return a nil user and nil error

* return userid

* support old archive format

* move template init to app layer

* move app init

* init app

* revert

* ignore GetDefaultTemplate blocks call in store mock

* ignore GetDefaultTemplate blocks call in store mock2

* ignore InsertBlockss call in store mock3

* ignore RemoveDefaultTemplates call in store mock4

* ignore WriteFile call in files mock5

* ignore WriteFile call in files mock6

* ignore WriteFile call in files mock7

* ignore WriteFile call in files mock8

* fix unit tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-02 11:25:06 -07:00
Harshil Sharma
21ba0e00ce
Fixes bug where images don't show up in templates and boards created from templates (#2224)
* Base fix for bug causing images to not appear in templates created from boards

* Added some docs

* Fixed lint error

* Update server/app/blocks.go

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

* used a better method name

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-02-02 10:12:59 -07:00
Doug Lauder
46801d72cb
Fix panic in PropDef.GetValue for person property types. (#2218)
* Fixed panic in PropDef.GetValue for `person` property types.
- the GetUserByID API can return a nil user and nil error

* return userid
2022-02-02 06:39:35 -07:00
Doug Lauder
65c783c270
Import/export moved to server + image support + streaming (#2201) 2022-02-01 19:01:29 -05:00
Doug Lauder
42c6ec5b61
Upgrade default templates on launch (#2167)
* store ImportArchive

* fix db call

* blockModifier

* fix template cards appearing

* remove old templates

* disable max-lines eslint rule

* undo eslint rule chg

* updates default templates

* Update server/services/store/sqlstore/archive.go

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-02-01 19:36:12 +01:00
Scott Bishel
66f4b90ef2
change log from error to debug (#2199) 2022-01-28 11:24:22 -07:00
Scott Bishel
bccfbd3d2f
MM-40542: Verify config setting in api (#2170)
* verify config setting in api

* update message

* fix lint

* update/add unit test, throw error

* fix typo
2022-01-28 10:35:38 -07:00
Asaad Mahmood
4662b03501
Adding gif support for boards (#2126)
* Adding gif support for boards

* Updating api
2022-01-26 18:45:44 +05:00
Doug Lauder
8f958abb9c
Don't log error message when multiple nodes try processing a notification hint at the same time. (#2166) 2022-01-25 14:30:06 -07:00
Scott Bishel
922e9ecd1a
GH-2130: Remove subscriptions feature flag (#2132)
* remove subscriptions feature flag

* lint fix
2022-01-19 07:27:26 -07:00
Chen-I Lim
86dcb8c25b
Add warning to API readme (#2140) 2022-01-18 13:02:43 -08:00
Doug Lauder
60af00ac3c
Resolve usernames for person property type (#2116)
* resolve usernames for  property types
2022-01-18 13:08:28 -05:00
Miguel de la Cruz
b92890f238
Fix default schema type for focalboard blocks history (#2122) 2022-01-15 17:12:11 -07:00
Doug Lauder
b33b998f9e
Fix prop change formatting for date & multiselect (#2110)
* fix prop value formatting for date & multiselect

* support date ranges
2022-01-12 15:24:28 -07:00
Doug Lauder
c6714a76bc
fix card link in notifications; card pointer was cached by template (#2096) 2022-01-11 18:14:21 -07:00
Jesús Espino
106a8e5b2e
Fixing unique ID problems on content order with multiple colums (#2071)
* Fixing unique ID problems on content order with multiple colums

* Fixing duplication

* Fix linter errors
2022-01-11 13:25:51 -07:00
Doug Lauder
855ea70a44
Stayin' Alive: Log & recover from web server panics (#2072)
* log webserver panics
* move panic handling to separate func
2022-01-10 15:33:05 -05:00
Doug Lauder
3f66fb52cc
List all authors of a card diff in the notification (#2055) 2022-01-07 10:11:36 -05:00
Scott Bishel
f0602a6eb6
Update version to 0.14.0 (#2057)
* update version to 0.13.0

* update to v0.14.0
2022-01-06 12:26:35 -07:00
Harshil Sharma
85c04ff4a6
Fixed a bug which didn't update block IDs in content order (#2054) 2022-01-06 07:41:18 -07:00
Doug Lauder
72bf464b22
Improved diff to markdown for card notifications (#2037)
* improved text diff for notifications

* fix panic selecting insert_at

* improvements wip

* simplified v1

* improved diff to markdown

* address review comments

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-01-05 14:11:58 -07:00
Doug Lauder
8cf73382b4
fix crash in DeleteBlock (#2040)
* fix crash in deleteblock

* fix unit test
2022-01-05 10:02:06 +01:00
Chen-I Lim
5c69c2de57
Fix #1745. Delete socket only if it exists (#2034)
* Fix #1745. Delete socket only if it exists

* Update jest snapshots to fix last year date text
2022-01-03 10:42:28 -08:00
Doug Lauder
2640cbd3ed
fix panic selecting insert_at (#2009)
Fixes a panic at start-up for plugin + postgres/mysql. When selecting on a timestamp database type, the type of the var to scan into is different based on database type. The fix is to convert the timestamp to string within the query and scan into a string.
2021-12-21 17:18:55 -05:00
Doug Lauder
7af9e18a49
Test all supported databases in CI (#2000)
* add mysql and postgres tests to CI
2021-12-17 12:30:47 -05:00
Doug Lauder
bf23bd0d25
Remove noisy error log for unit tests 2021-12-17 01:05:05 -05:00
Doug Lauder
11703acb8a
fix syntax errors for mysql (#1997) 2021-12-16 12:43:50 -05:00
Jesús Espino
2e4d015586
Fixing and regenerating swagger documentation (#1990) 2021-12-15 20:54:23 +01:00
Doug Lauder
75bd409ba0
Notifications phase 1 (#1851)
Backend support for subscribing/unsubscribing to blocks, typically cards and boards. Notifies subscribers when changes are made to cards they are subscribed to.
2021-12-10 10:46:37 -05:00
Jesús Espino
7952d6b018
Include migration for content order on unique id migration (#1965)
* Include migration for content order on unique id migration

* Adding test case for other workspace

* making lines shorter
2021-12-10 09:33:41 -05:00
Scott Bishel
3450eb6d4f
Gh 1841 batch patches (#1935)
* Updating table row css (#1787)

* package patchBlocks as batches, move updateBlocks to transactional

* fix lint errors

* fix from review

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-12-10 07:17:00 -07:00
Doug Lauder
3be03f0cd0
fix mysql migration (#1964)
Fix unsupported SQL syntax for MySQL
2021-12-10 08:56:11 -05:00
Hossein
199da41f6d
Fix MM-40428 (#1926) 2021-12-10 08:28:52 -05:00
Harshil Sharma
6b23795ff3
Removed unused fields (#1944)
* removed unused fields

* lint fix

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-12-08 12:47:47 -07:00
Hossein
dc36afcfba
GH-1878: Display Bot Badge in Auto Complete (#1906) 2021-12-08 10:04:19 -05:00
Hossein
c8d4c98f8c
Fix Issues (#1923) 2021-12-08 09:07:28 -05:00
Doug Lauder
487d59b790
don't notify @mnetioned user who are not members of channel (#1912) 2021-12-03 13:33:59 -05:00
Doug Lauder
8be71b1498
Don't insert nulls into blocks_history table. (#1890)
Ensure all fields are non-NULL when inserting into blocks_history (on block delete).
2021-12-03 12:32:57 -05:00
Chen-I Lim
ed2c916afa
Update to v0.12 (#1904) 2021-12-01 14:55:47 -08:00
Jesús Espino
2f08c67827
Adding explict logout logic (#1895)
* Adding explict logout logic

* Fixing golangci-lint errors
2021-12-01 10:21:31 +01:00
Chen-I Lim
91dc9def9b
Update version to 0.11.0 (#1859) 2021-11-22 16:15:03 -08:00
PrasannaSudharsan R
09f0f0717c
425|Added unit tests for workspaces.go (#1800) 2021-11-22 01:46:51 -05:00
Miguel de la Cruz
e7c38c8822
Adds data migrations and the unique IDs migration (#1776)
* Adds data migrations and the unique IDs migration

* Adds GetSystemSetting tests

* Add log statements to data migrations

* Move migrations to the store and ensure they follow an order mixing database and data migrations

* Fix system settings

* Add tests for unique id migration

* Small comment change

* Make a couple of methods private and wrap the migration in a transaction

* Update public methods

* Add database mutex to data migrations

* Create server params and pass a mutex factory to the store

* Fix plugin linter

* Make isPlugin private

* Fix comment typo

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2021-11-11 17:01:43 +01:00
Scott Bishel
f74eea11ba
Fix for feature flag handling (#1753)
* fix for handling feature flags changing

* update tests

* fix tests

* lint fixes

* feedback updates

* use getConfig instead

* linter fix

* more linter

* revert changes

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-09 07:56:04 -07:00
Miguel de la Cruz
fa36e092bb
Server generated ids (#1667)
* Adds server ID generation on the insert blocks endpoint

* Fix linter

* Fix server linter

* Fix integration tests

* Update endpoint docs

* Update code to use the BlockType2IDType function when generating new IDs

* Handle new block ids on boards, templates and views creation

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-05 11:54:27 +01:00
Miguel de la Cruz
751f632c36
Modify store creation not to fail on template initialization failure (#1722) 2021-11-03 19:10:32 +01:00
Doug Lauder
849cc5c195
Move BlockType2IDType from utils to model (#1744) 2021-11-03 12:01:39 -04:00
Miguel de la Cruz
59413a9fc4
Changed server not bind to any port to debug, as it's a plugin only option (#1743) 2021-11-03 15:24:31 +01:00
Doug Lauder
c3a08c3418
utils.BlockType2IDType (#1715) 2021-11-02 09:17:53 +01:00
Scott Bishel
9b9682f626
Create FeatureFlags in configurations (#1622)
* create FeatureFlags in configurations

* update for unit tests

* update unit tests, go.mod

* update go.sum

* fix lint errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-11-01 19:12:43 -06:00
Doug Lauder
c9a629d135
typed block type (#1672) 2021-10-26 21:11:19 -04:00
Archit Mathur
5848ea1c07
[GH-1256] feat: config file flag (#1418)
* feat: adds support for --config

* feat: adds support for configFilePath in startServer

* chore: removes ugly spacing
2021-10-26 17:49:20 +05:30
Harshil Sharma
1eb5c22571
Removed nullability of block created by and modified by fields: (#1603)
* Rmeoved nullability of block created by and modified by fields:

* Fixed incorrect column name in migration
2021-10-25 19:50:38 +05:30
Chen-I Lim
ae552e260c
Update to v0.10 (#1633) 2021-10-22 13:59:05 -07:00
Hossein
eed1f86c15
Unfurl Focalboard Link (#1081) 2021-10-22 12:13:31 -04:00
Miguel de la Cruz
8666bc833a
Adds a generator that wraps store methods with transactions and migrates implementations to use transactions (#1440)
* Adds a generator that wraps store methods with transactions and migrates implementations to use transactions

* Remove OpenTracing parameters from the generator

* Remove unused template methods

* Generate transactional methods only for those labelled as so

* Fix linter
2021-10-22 12:48:53 +02:00
Scott Bishel
d0083f6ed0
GH-1489: Add Telemetry for Shared Boards (#1610)
* add telemetry for shared boards

* move where setting view out of Routes

* add for configuration setting

* fix spacing

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2021-10-21 11:17:31 -06:00
Doug Lauder
4b5436696f
don't allow notifications for import (#1565) 2021-10-15 15:09:43 -06:00
Scott Bishel
a756b7e1c6
remove connection string from log (#1564) 2021-10-14 13:04:35 -04:00
Miguel de la Cruz
a184206395
Change the unregistered connection logline to debug level (#1494) 2021-10-08 11:59:21 +02:00
Doug Lauder
db8d91f889
use milliseconds for all timestamps (server) (#1447) 2021-10-07 07:51:01 -04:00
Doug Lauder
4feafb9806
Channels style UUID (#1369)
* server channels style uuids
* webapp channels style uuids
2021-10-05 09:52:59 -04:00
Doug Lauder
1a59052f0c
Update migrate.go (#1396)
Remove left-over debugging line.
2021-10-04 10:06:01 +05:30
Miguel de la Cruz
ce98ec55fc
Recovers inactive websockets connections on reconnect in plugin mode (#1324)
* Stores a cache of inactive connections so their subscriptions are recovered on reconnections

* Adds test for getUserIDsForWorkspace and simplify messages through helpers

* Make the plugin websocket client more resilient

* Remove missed event callback and limit ws state polling to one at a time

* Add read lock for the plugin adapter and guarantee atomic ops on inactiveAt

* Add mutex to the plugin adapter client and tests to cover for races

* Split plugin adapter mutex in two and use them to lock only on data access

* Group plugin adapter fields by the mutex that's guarding them
2021-09-29 18:19:34 +02:00
Harshil Sharma
e40424e319
Handled the case of missing user (#1367) 2021-09-29 11:27:21 +05:30
Miguel de la Cruz
a8da028bc7
Adds workspaceID to blocks and makes board page only reacts to the workspace updates (#1299) 2021-09-22 13:57:00 -06:00
Miguel de la Cruz
9086246fb5
Adds modd based targets that watch both server and webapp (#1257)
* Adds modd based targets that watch both server and webapp

* Add modd precheck to related targets
2021-09-22 15:40:04 +02:00
Harshil Sharma
950a88be5e
Added MySQL migration for applying column level collation (#1297) 2021-09-22 09:23:02 +05:30
Scott Bishel
9c94bbb19a
disable flakey test (#1306) 2021-09-21 13:25:45 -04:00
Doug Lauder
6daaf3ef59
ensure @mentions only sent to team members (#1216) 2021-09-20 17:32:47 -04:00
Harshil Sharma
5faa669739
Workspace switcher query Mysql issue resolved (#1252)
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-20 14:14:19 +05:30
Chen-I Lim
33e717d9bc Update version to v0.9.1 2021-09-17 12:56:47 -07:00
Scott Bishel
838c6f90b7
Config for share board (#1187)
* initial commit for setting shared board configuration

* add unit test

* working again

* update default config

* initial commit for setting shared board configuration

* add unit test

* working again

* update default config

* add unit tests, some clean up

* more cleanup

* more clean up

* remove header text for GH-1105

* remove unnecessary logs

* update text

* fix lint errors

* more lint fixes

* webapp lint fixes

* Update mattermost-plugin/plugin.json

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>

* Update mattermost-plugin/plugin.json

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>

* update for review, sync with main

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
2021-09-16 13:31:02 -06:00
Miguel de la Cruz
f7946821a0
Propagate block changes to all of the cluster nodes in plugin mode (#1213)
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-16 12:18:11 +02:00
Doug Lauder
a76385268e
MM-38342 plugin logging (#1193)
- bump chat server version
- plugin logging adapter
2021-09-15 09:01:05 -04:00
Doug Lauder
8425f53b2a
@mention support (#1147) 2021-09-13 15:36:36 -04:00
Harshil Sharma
20aafbc376
Displayed channels names for DMs in user workspace list (#1179) 2021-09-13 17:42:32 +05:30
Harshil Sharma
bb4b463a4f
Workspace Switcher - include channels with no workspaces and boards (#1158)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

* Displayed all channels in workspace switcher

* Included channels without a Focalbaord workspaces in worksapce switcher as well

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-09-09 16:18:07 +05:30
Harshil Sharma
08db4fed61
Workspace switcher (#1052)
* API WIP

* WIP

* Finished changes

* Fixed colors:

* Don't enforce charset adn collation in migration, pick from database DSN

* Added MySQL query

* Updated mocks

* Added tests

* Lint fixes

* Fixed typo and removed unsed style

* Checked in a snapshot

* Updated snapshot

* Updated Cypress test

* Updated Cypress test

* Updated Cypress test

* Fixed review comments

* Fixed tests

* Added default collation for MySQL

* Added documentation for ensuring correct database collation

* Updated migrations

* Fixed a bug with collation

* Fixed lint errors

* Used correct collation

* debugging

* Updating css

* Minor UI changes

* USe inbuilt default collation

* Used only charset for mysql

* Fixed linter issue:

* Added migration for matching collation

* Reverted local config changes

* Reverted local config changes

* Handled the case of personal server running on MySQL

* WIP

* Now running collation matching migration onlyt for plugins

* Minor optimization

* Multiple review fixes

* Added group by clause to primary query

* Supported for subpacth

Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
2021-09-08 10:22:03 +05:30
Scott Bishel
94e6e8a9f7
Plugin telemetry (#1069)
* implement webapp telemetry

* cleanup

* remove imports, update events

* change event title

* update for lint

* add test, update filename

* linter fix

* fix field name

* revert changes

* fix test

* update builds

* fix workflows

* fix workflows

* fix workflow

* temp checkin

* remove log lines

* updates from peer review
2021-09-01 15:53:27 -06:00
PrasannaSudharsan R
59b8ae4517
423 | Added unit tests for files.go (#1119)
* 423 | Added unit tests for files.go

* 423| Fixed linting errors

* 423 | Fixed linting errors in files_test.go

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-08-31 16:08:18 -06:00
dave
414d651d2c
[GH-432] Add unit tests for ./services/telemetry/telemetry.go (#1091)
* Add unit tests  for ./services/telemetry/telemetry.go

* make ci happy

* Update server/services/telemetry/telemetry_test.go

Update imports

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

* Update server/services/telemetry/telemetry_test.go

Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-08-30 20:16:47 -06:00
Miguel de la Cruz
e10229031f
Add a plugin adapter to reuse MM websocket in plugin mode (#1079)
* Add a plugin adapter to reuse MM websocket in plugin mode

* Remove development replace

* Switch all go.mod files to use 1.16

* Fix linter issues

* Fix linter

* Update server version to contain the new hooks
2021-08-27 10:59:14 +02:00
Jesús Espino
e834c15ce7
Only run the sessions clean up on plugin mode (#1043)
* Only run the sessions clean up on plugin mode

* fix error
2021-08-26 11:33:34 +02:00
Doug Lauder
b58497e2ea
Replace mlog with server v6 mlog (#1088)
* replace mlog with server v6 mlog
* remove FB mlog from plugin
2021-08-25 16:08:01 -04:00
Miguel de la Cruz
f9c76d8129
Update focalboard to be compatible with mattermost v6 (#1020)
* Update focalboard to be compatible with mattermost v6

* Point to the new plugin API version

* Fix collectors linter issues

* Move all CI jobs to 1.16
2021-08-24 12:13:58 +02:00
Harshil Sharma
0d97b6e281
Table calculations (#761) 2021-08-10 14:19:00 -04:00
dave
15b5d9746f
[GH-436] Add integration tests for missing User API endpoints (#810)
* server/client: support register and login

* server/client: support user related apis

* integrationtests: Add SetupTestHelperWithoutToken

* Add api integration tests for (User APIs)

* rename GetUserMe method to GetMe

* check GetMe data is match the registered data after login

* Add integration test for workspace upload file api

* make ci happy
2021-08-09 22:57:45 -04:00
Chen-I Lim
904dfc2158
Add server id to plugin telemetry (#903) 2021-08-06 12:03:56 -07:00
Chen-I Lim
7d2a58081c Update version to v0.9.0 2021-08-06 10:37:28 -07:00
Jesús Espino
c734cfb8d1
Adding support for patch blocks (#877)
* Adding support for patch blocks

* Adding some improvements

* Adding api integration test for patch

* Adding SQL store tests

* Regenerating autogenerated code

* Fix linter errors

* Remove wrong update of the swagger file

* Update server/model/block.go

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>

* Fix gofmt

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
2021-08-06 14:10:24 +02:00
Jesús Espino
be28b7dad5
Migrate webapp global state to redux (#737)
* Migrating workspace tree to redux

* More changes for use the redux store for boads and views

* Taking into account the templates on websocket event updates

* Fixing bug on boardTree maintenance

* Websocket client now connects once and subscribe/desubscribe on the fly

* Including usage of the new websocket client

* More work around migrating to redux

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* Fixing some things

* WIP

* WIP

* Another small fix

* Restoring filtering, sorting and grouping

* Fixing some other bugs

* Add search text reducer

* Fixing another drag and drop problem

* Improve store names and api

* Fixing small bgus

* Some small fixes

* fixing login

* Fixing register page

* Some other improvements

* Removing unneeded old files

* Removing the need of userCache

* Fixing comments and fixing content ordering

* Fixing sort

* Fixing some TODOs

* Fixing tests

* Fixing snapshot

* Fixing cypress tests

* Fix eslint

* Fixing server tests

* Updating the add cards actions

* Fixing some tiny navigation problems

* Mocking the api calls to pass the tests

* Migrating a new test to redux

* Adding the card right after the insert of the block (not wait for ws event)

* Showing the ws disconnect banner only after 5 seconds of disconnection

* Fixing share view

* Fix eslint

* Fixing problem with sort/groupby modifications

* Fixing some details on redirections and templates creation

* Fixing small bugs around undo

* Fix update properties on click outside the dialog

* Improving the column resize look and feel

* Removing the class based objects from the store (now they are all plain objects

* Fix eslint

* Fixing tests

* Removing unneeded code
2021-08-02 17:46:00 +02:00
Jesús Espino
615d7260f4
Fix connection leak in db migration (#819) 2021-08-02 16:48:15 +02:00
dave
b0cf6d0d2f
[GH-443] Add unit tests for ./services/webhook/webhook.go (#710)
* Add unit tests for ./services/webhook/webhook.go

* fix logger in TestClientUpdateNotify

* make ci happy

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2021-07-30 15:13:51 -06:00
Jesús Espino
bb81426b56
Adding a missed rollback call (#803) 2021-07-29 19:49:57 +02:00
dave
cfac3fe81b
[GH-431] Add unit tests for ./store/sqlstore/workspaces.go (#768)
* Add unit tests for ./store/sqlstore/workspaces.go

* replace require.Nil to require.NoError

* Fixing problem with workspace settings upsert

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-07-29 11:56:57 +02:00
Jesús Espino
6a7d3f797b
Websocket client now connects once and subscribe/desubscribe on the fly (#752)
* Websocket client now connects once and subscribe/desubscribe on the fly

* Fixing eslint error

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2021-07-28 18:14:18 +02:00
Doug Lauder
efedf2f481
Fix nil stringer error (#788)
* fix nil stringer error
* include API path with all API ERROR logs
* enable "caller" field
* disable colour output and min msg length for plugin
* bump Logr version to v2.0.4
2021-07-27 12:57:29 -04:00
dave
a98bcb98ff
Add more unit tests for ./store/sqlstore/user.go (#787)
* Add more unit tests for ./store/sqlstore/user.go

* replace require.Nil to require.NoError

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2021-07-27 11:42:02 -04:00
Chen-I Lim
3b11202e3d
InsertBlock per workspace logic (#777) 2021-07-24 08:08:25 -07:00
dave
bafa32108d
[GH-428] Add unit tests for ./store/sqlstore/session.go (#729)
* fix can't delete session

* Add unit tests for  ./server/store/sqlstore/session.go

* fix ci lint complain

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
Co-authored-by: Hossein <hahmadia@users.noreply.github.com>
2021-07-22 07:56:25 -04:00
Miguel de la Cruz
0bd6233fac
Refactor the websockets connection messages and lifecycle (#749)
* Refactor the websockets connection messages and lifecycle

* Modify frontend to subscribe to a workspace instead of a set of blocks

* Fixing linter errors

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-07-19 15:04:17 +05:30
Chen-I Lim
73225e959b Merge release-0.8.0 2021-07-16 10:30:45 -07:00
Doug Lauder
f317574a6d
add mlog package to stack filter list (#717) 2021-07-15 11:42:53 -04:00
Doug Lauder
a0524dd386
Lint server & plugin for CI (#720)
* enable CI linting for server and plugin
* replace `golint` (deprecated) with `revive`
* use GH actions for lint
2021-07-14 09:36:18 -04:00
Chen-I Lim
1b45e16e52 Update to v0.8.0 2021-07-09 09:36:57 -07:00
Doug Lauder
0dec704ddc
fix linter errors in plugin (#696) 2021-07-09 12:59:44 +02:00
Harshil Sharma
74cf28fee5
Added missed test (#695)
* Fixed missing errors

* Used missed test
2021-07-09 00:36:50 -04:00
Harshil Sharma
e0ccfb90e7
Fixed missing errors (#694) 2021-07-09 09:11:54 +05:30
Doug Lauder
ebd477464b
fix remaining golangci linter warnings (#686)
* fix remaining linter warnings
2021-07-08 21:09:02 -04:00
Harshil Sharma
e0ec1c03e0
New Props: Created By, Created At, Updated By, Updated At (#583)
* Added create_at column for blocks

* Populating created by

* Added logic for storing created by

* Added GetBlock by ID to store interface

* Added creayed by and modified by properties

* Added created by and modified by properties

* Added lastmodifiedat property

* Fixed existing webapp test

* Added webapp unit tests

* Added webapp unit tests

* Added webapp unit tests

* Adding server test

* Added server tests

* Fixed a bug causing created by to be set empty

* Avodining timezone specific test behavior

* Made cypress viewport bigger to avoid out-of-viewoport issues in multiple tests

* Removed a leftover comment

* Added updated at/by in table view

* Added updated at in card view

* Fixing sort

* Fixed sorting of updated by

* Fixed existing tests

* Added table tests

* Added cardTree fix

* Fixed tests

* Removed unused import

* Update snapshots

* Added a tamper attempt test

* Removed some leftover debug code

* Removed sending creator from client

* Fixed lint error

* Fixed a build issue

* Avoided setting insert query params multiple times

* Multiple minor review fixes

* Fixed test
2021-07-08 20:06:43 +05:30
Doug Lauder
6e214ebc3d
Ensure all code paths close *sql.Rows (#679)
* ensure all code paths close *sql.Rows
2021-07-06 16:44:11 -04:00
Jesús Espino
0811052a9b Fixing workspace title generation 2021-07-01 11:29:12 +02:00
Harshil Sharma
1020c03924
Prevented concurrent writes to websocket (#658)
* retained individual connection objects

* unlocking lock in defer

* Completely abstracted internal connection object

* Completely removed direct use of WS connection
2021-07-01 08:11:29 +02:00
Agniva De Sarker
8e72b9c528
Add RPC API support to plugin (#619)
* Add RPC API support to plugin

We use the mattermost-plugin-api client to create the sql.DB object
and pass it to the store.

To keep a common point of entry for both the standalone server
and plugin, we refactor the store creation part out of server.New
and pass the DB as a dependency to the server constructor.

This allow us to create different stores in plugin and standalone,
so that the server code remains unaware of any differences.

https://focalboard-community.octo.mattermost.com/workspace/zyoahc9uapdn3xdptac6jb69ic?id=285b80a3-257d-41f6-8cf4-ed80ca9d92e5&v=495cdb4d-c13a-4992-8eb9-80cfee2819a4&c=c7386db7-65fd-469b-8bcf-8dc8f8e61e4f

* Support linux desktop app

* refactor

* fix typos

* Change authlayer to use existing DB conn too
2021-06-25 16:49:06 +02:00
Doug Lauder
66975bdfe9
First pass linter cleanup (#603)
* first pass linter cleanup

* address review comments
2021-06-21 11:21:42 +02:00
Doug Lauder
edc3eb7e8f
Refactor App lifecycle (#590)
* remove Server dep from App

* remove appbuilder
2021-06-18 16:03:42 +02:00
Doug Lauder
ddfae3266a
rename logger & audit config (#591) 2021-06-18 16:01:36 +02:00
Doug Lauder
d5096379de
Remove enterprise symlink (#589)
* fix make

* remove enterprise server build from make

* remove enterprise ifaces

* update .gitignore
2021-06-18 07:48:01 +02:00
Doug Lauder
5c69113911
Auditing (#542)
* audit wip

* finish API coverage

* fix unit test

* remove sample logging and audit config

* default logger

* fix go.mod and go.sum
2021-06-11 14:24:51 +02:00
Jesús Espino
3ae3c5fce1
Adding the users for workspace in mattermost layer (#564) 2021-06-11 12:40:22 +02:00
Miguel de la Cruz
9b5e0483f5
Fix MySQL migration connection when the DSN doesn't contain any query parameters (#557) 2021-06-11 11:18:11 +02:00
Doug Lauder
46243c1ad1
Telemetry and metrics (#496)
- total blocks by block type
- total workspaces
- blocks activity (insert/delete)
- login success / fail
2021-06-04 10:38:49 -04:00
Harshil Sharma
90f6389745
Person Property Type (#406)
* Added getWorkspaceUsers API

* Integrated workspace user API in UI

* Integrated workspace user API in UI

* Added toto for implementation slot

* Implemenmted getWorkspaceUSers to get data from Focalboard DB

* Updated store mocks

* Made select styles a shared constant

* Removed unwanted diffs

* Removed unwanted diffs

* Updated snapshots for new property type

* Added user store test

* Added missing copyright notice

* Returning error if no users found to retain original behavior

* Minor fixes and added tests

* Minor fixes

* Used React context for workspace users

* Used useContext hook, and added additional user ID -> user context to avoid that computation by all componnets

* Mergerd both workspace user contextx

* Minor review fix
2021-06-04 18:53:15 +05:30
Doug Lauder
68d492a855
Bump Logr version to fix Windows build (#520)
* bump Logr version to fix Windows build

* fix return args for syslog_unsupported
2021-06-04 08:43:32 +02:00
Matheus Mosca
ac320ece25
Add units tests for app/sharing.go (#454)
* tests: add units tests for GetSharing

* tests: add unit tests for UpsertSharing

* refactor: add test helper in sharing unit tests

* cleanup
2021-06-03 14:59:16 -05:00
Doug Lauder
417de9f837
Logger for FocalBoard server (#466)
- structured, asynchronous logging
- supports discreet log levels, including custom levels
- supports output to console, files, and all common log aggregators.
- supports JSON, plain text and GELF formats
- lazy formatting and writing
2021-05-29 02:23:10 -04:00
Harshil Sharma
3bf9d9382e
Clickable Links (#393)
* Added implementation for making links clickable

* Improved some clicking UX

* Removed unused stuff

* Fixed lint issues

* Added Compass Icons to Focalboard

* Updaed go.mod

* Made sure links in URL property are always assumed as absolute

* Removed unnecessary JSX code block

* Allowing only http and https protocols

* Removed unused extensions from file loader

* Icon and URL imporvements

* Added React component for Compass Icons.
* Allowed URLs with any arbitrary protocol.
2021-05-26 16:14:09 +05:30
Scott Bishel
6cb7e49a2b
add unit tests (#422)
* add unit tests

* cleanup

* cleanup

* rename helper file, remove gomock.eq()

* update import
2021-05-26 12:38:43 +02:00
Carlos Tadeu Panato Junior
36acff4476
Add GitLab ci to build internally and bump go to 1.16 (#468)
* update go to 1.16

* add gitlab ci to build focalboard
2021-05-26 12:34:42 +02:00
Miguel de la Cruz
b327bc7b8a
Adds plugin actions to the project's CI (#471)
* Adds plugin actions to the project's CI

* Remove the version number from the generated artifact

* Change job name to something more descriptive

* Switch back to workflow_dispatch
2021-05-25 19:22:31 +02:00
Jesús Espino
f1b8d88d6b
Changing mattermost-auth method to work based on shared database access (#335)
* Improving mattermost auth implementation

* Making mattermost-auth based on shared database access

* Reverting unneeded changes in the config.json file

* Fixing tiny problems

* Removing the need of using the mattermost session token

* Fixing some bugs and allowing to not-bind the server to any port

* Small fix to correctly get the templates

* Adding the mattermost-plugin code inside focalboard repo

* Adding a not working code part of the cluster websocket communication

* Updating the mattermost version

* Adding the cluster messages for the websockets

* Updating to the new node version

* Making it compatible with S3

* Addressing some tiny problems

* Fixing server tests

* Adds support for MySQL migrations and initialization

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
2021-05-24 19:06:11 +02:00
Chen-I Lim
4c3f14e027 Merge release-0.6.7 2021-05-24 09:59:30 -07:00
Jesús Espino
2d542bbd30 Removing unneeded test 2021-05-24 17:47:38 +02:00
Jesús Espino
746105f14b Removed insecure and not used method 2021-05-24 14:49:40 +02:00
Spiros Economakis
8f746a44bd
Enable prometheus metrics for Focalboard to enable observability (#414)
As an SRE team we would like to expose standard metrics and grouped by version
of the application. Right now will expose only metrics related to Go but instrumentor
should be used in other parts of the codebase so we can track other metrics, eg.
number of tasks, boards, users etc. Similar as we do in MM.

It will run in port `localhost:9092` and it is a new config `prometheus_address`.

Also in the commit we introduced, `group.Add` which helps us to handle gracefully
errors for goroutines. It's a good practice and there are couple of articles by
Golang for this.
2021-05-18 17:12:51 +03:00
Hossein
e2dd9a978a
Add Export/import board (#403)
* Resolve GH-261

* fix eslint

* Address comments

* update mocks

* add test
2021-05-13 15:04:49 -06:00
Harshil Sharma
1f60e70ef3
Used Node 16 and prevented soctet error from starting (#402) 2021-05-11 11:56:40 +02:00
Chen-I Lim
5fe51a9c0c Update for v0.6.7 2021-05-10 12:22:42 -07:00
Harshil Sharma
21c5284d6d
#GH-31 Configured Golangci-Lint and fixed errors (#381)
* Moved golangci-lint config to config file

* Fixed all golangci lint errors

* Not allowing telemetry shutdown error to prevent store from closing

* Remved golangci-lint presets
2021-05-10 17:15:27 +02:00
Jesús Espino
842c2cc0ab Adding system store tests 2021-04-30 16:48:45 +02:00
Jesús Espino
8860f60948 Adding extra test to cover more functions in blocks store 2021-04-30 16:31:04 +02:00
Chen-I Lim
1801422543
Fixes for workspace support (#321) 2021-04-26 13:43:02 +02:00
Jesús Espino
2d261fde59
Adding mysql support to the database (#301)
* Adding mysql support

* Fixing other test cases

* Tests passing on mysql

* Fix the row number generation

* Adding blocks_history table

* merging the migrations in one single set of files

* Passing mysql tests

* Fixing default encoding on mysql

* Simplifying things

* Removing from the blocks table all deleted blocks

* Better indentation

* Moving db types to constants to make it less error prone

* reducing duplicated code

* Removing log line

* Now sql tests are running properly in mysql, sqlite and postgres
2021-04-22 22:53:01 +02:00
Chen-I Lim
4a5d7c4a64
Fix #312. Release 0.6.6 (#313)
* Fixed #269

* Fixing checkbox widht

* Fix #274. Add re-login button to error page.

* Fix #276. Login page title

* Rev Mac build version

* Update changelog for v0.6.5

* Rev Mac build number

* GitHub Actions: Build with Xcode 12.4

* Fix #297: Mac keybpard handling

* Rev Mac built to 12

* Update to v0.6.6

* Fix #312. Windows app images

* Move db and files to Documents\Focalboard on standalone Win app

* Make Win app fixupp code more robust

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2021-04-21 18:25:26 -07:00
Chen-I Lim
e61ba4a7a8 Update to v0.6.6 2021-04-21 12:56:14 -07:00
Jesús Espino
ec1de1c9c2
merging the migrations in one single set of files (#289) 2021-04-20 11:27:20 +02:00
Jesús Espino
d668bf6626 Fix a backward compatibility problem 2021-04-17 10:05:07 +02:00
Jesús Espino
83375684af Adding tablePrefix support 2021-04-17 09:09:34 +02:00
Jesús Espino
5ab3f8d3ce
Addining subpath support (#241)
* Addining subpath support

* Fixing a subpath problem in suburls

* Using the server root for allow subpaths

* Fixing baseURL variable name

* Some improvements

* Making it work in mattermost plugin

* Fixing eslint warnings

* Fixing cypress tests
2021-04-16 13:42:37 +02:00
Chen-I Lim
bc5787ff3a Update version to v0.6.5 2021-04-13 11:04:22 -07:00
ziprandom
530dc81a1c server: additionally read config settings from env
make the server app read configuration settings from execution
environment to make server deployments more convenient.
2021-04-01 10:36:56 +00:00
Chen-I Lim
41ccd7651c Fixup for old file path 2021-03-31 15:30:25 -07:00
Chen-I Lim
c47333948e Rev to v0.6.2 2021-03-31 11:59:07 -07:00
Chen-I Lim
7be7bed916 Show workspace title in sidebar 2021-03-30 15:25:16 -07:00
Chen-I Lim
3531c8307d Global template support 2021-03-30 14:04:00 -07:00
Jesús Espino
c435b23f29
Merge pull request #212 from jespino/better-enterprise-integration
Better enterprise integration
2021-03-30 19:57:40 +02:00
Chen-I Lim
8901bb964c filepath.Join 2021-03-30 10:06:11 -07:00
Chen-I Lim
9ff340c989 Store files per workspace and root block 2021-03-29 16:27:35 -07:00
Chen-I Lim
771be97c3e Workspace support in websockets 2021-03-29 13:00:40 -07:00
Chen-I Lim
aa363041e7 Support worksapce in websocket 2021-03-29 12:31:42 -07:00
Jesús Espino
a8d3d98881 Better enterprise integration 2021-03-29 20:10:12 +02:00
Chen-I Lim
98bfd5a57a Allow sharing with workspace 2021-03-29 10:41:27 -07:00
Chen-I Lim
0b479ff3ae Handle workspace in websocket 2021-03-26 18:04:23 -07:00
Chen-I Lim
68f2b5bedb Fix delimiter for postgres 2021-03-26 13:55:14 -07:00
Chen-I Lim
725971784b Workspace backend support 2021-03-26 11:01:54 -07:00
Jesús Espino
118ba53077 Updating server dependencies 2021-03-26 11:44:46 +01:00
Bo-Yi Wu
2b4e03eed6 chore(format): update coding style 2021-03-21 16:28:26 +08:00
Chen-I Lim
a34c9a7128 Fix #136: Update the displayed version 2021-03-19 09:59:46 -07:00
Emrecan BATI
13339663bb Remove unversioned mattermost-server dependency 2021-03-18 19:26:40 +03:00
Jesús Espino
3290ab48b8 Fixing email validation 2021-03-18 13:34:42 +01:00
lutfuahmet
4887aee648 Register Request email validation 2021-03-18 10:32:23 +03:00
Chen-I Lim
af7f666eff Return JSON empty array when not found, and handle null arrays 2021-03-08 16:08:17 -08:00
Chen-I Lim
eaf8321f52 Update to v0.6.0 2021-03-08 09:36:14 -08:00
Chen-I Lim
da6ffd3eb0 Windows WPF / UWP app 2021-03-01 11:36:36 -08:00
Chen-I Lim
02e436c902 Store fileId for image blocks instead of url 2021-02-23 11:42:28 -08:00
Chen-I Lim
a6920d9bad Link to openAPI html doc 2021-02-17 11:32:03 -08:00
Chen-I Lim
1ad985232d Add Swagger / OpenAPI docs 2021-02-17 11:29:20 -08:00
Chen-I Lim
0082fd0dd3 Move single-user-token to environment var 2021-02-11 10:13:17 -08:00
Chen-I Lim
656d1c7851 single user token in server tests 2021-02-09 16:07:41 -08:00
Chen-I Lim
3ba6f7fa0a Disable login, reg, change password for single-user 2021-02-09 15:58:08 -08:00
Chen-I Lim
0fe96ad7ed Check for single user token 2021-02-09 12:27:34 -08:00
Chen-I Lim
1957e1dbaa cleanup 2021-02-05 11:22:56 -08:00
Chen-I Lim
c484eb8c43 Don't require CSRF token for get files 2021-02-05 10:45:28 -08:00
Chen-I Lim
daf83691b1 Refactor API to use middleware 2021-02-05 10:28:52 -08:00
Chen-I Lim
519cfacaf2 Add X-Requested-With to server test 2021-02-03 10:42:06 -08:00