Commit Graph

708 Commits

Author SHA1 Message Date
Jesús Espino
61a8af8f34
Restoring guest account access and adding backend part of the guest accounts support (#2929)
Co-authored-by: Paul Esch-Laurent <paul.esch-laurent@mattermost.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-24 17:08:58 -05:00
Miguel de la Cruz
e1a39e57ff
Adds a check that errors on store start if MariaDB is detected (#3725)
* Adds a check that errors on store start if MariaDB is detected

* Fix linter

* Update error message

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-24 14:36:43 -06:00
Jesús Espino
2b39745f68
Adding the permissions for commenter + viewer roles (#2882)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Paul Esch-Laurent <paul.esch-laurent@mattermost.com>
2022-08-24 15:36:28 -05:00
Miguel de la Cruz
03a6a963eb
Updates db indexes to improve performance (#3732)
* Updates db indexes to improve performance

* Fix order-dependant test

* Fix another order-dependant test
2022-08-24 18:42:41 +02:00
Doug Lauder
509374cc4f
Set FOCALBOARD_UNIT_TESTING for integration tests (#3733) 2022-08-24 16:18:51 +02:00
Doug Lauder
0ffc721e64
Add Preferences service API for product and plugin (#3727)
* Add Preferences service API for product and plugin

* add missed switch case

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-24 09:08:56 +05:30
Doug Lauder
0311cc91ad
Add disableNotify param to client APIs, to match Rest APIs (#3723) 2022-08-23 10:37:49 -05:00
Scott Bishel
0403c22f3c
Post message channel change (#3717)
* initial implementation

* checking changes

* use boards bot

* update mocks

* linter fixes

* linter fixes

* clean up

* revert manifest change

* another lint fix

* use common error

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-23 08:48:41 -06:00
Doug Lauder
1c383fb179
Add disable_notify to all block APIs that can trigger notifications. (#3720)
* Add disable_notify to all block APIs that can trigger notifications.
2022-08-22 19:06:45 -04:00
Doug Lauder
a91e1f1758
Remove BoardID field from BlockPatch, ensuring patching a block cannot change boardID (#3719) 2022-08-22 15:57:22 -04:00
Miguel de la Cruz
67cec5de4f
Remove duplicated store and app method to get blocks that belong to a board (#3698) 2022-08-22 21:53:59 +02:00
Miguel de la Cruz
831dff6192
Print log server information on plugin run (#3711)
* Print log server information on plugin run

* Add LogServerInfo to product mode

* Fix log location
2022-08-19 13:16:18 -04:00
Miguel de la Cruz
feb49eaf19
Add foundation tests (#3670)
* Add foundation and its instrumentation code

* Add migration 18 and deletedMembershipBoardsMigration tests

* Update go sum
2022-08-18 17:03:33 +02:00
Doug Lauder
765fbc88e9
Register API router in product mode (#3700)
* register API router in product mode

* period in comment (really?)
2022-08-17 17:50:01 +02:00
Paul Esch-Laurent
68bf52cfcd
fix: return empty props in single-user mode (#3691) 2022-08-17 09:09:15 -06:00
Miguel de la Cruz
19ef6533f6
Adds data migration to clean badly assigned boards (#3635)
* Adds data migration to clean badly assigned boards

This data migration fetches all boards whose owner has a deleted
membership on the board's team and fixes them by processing them
again, this time with the fix applied to the `getBestTeamForBoard`
function that skips deleted teams and team memberships

* Do not create a transaction if there are no offending boards found

* Fix linter
2022-08-11 09:22:32 -06:00
Jesús Espino
2f29266767
More robust RHS handling of websocket events (#3648)
* More robust RHS handling of websocket events

* Fixing tests
2022-08-11 15:22:02 +02:00
Jesús Espino
1e2e3fb055
Making more robust websocket notifications on synthetic memberships (#3598)
* Making more robust websocket notifications on syntetic memberships

* Address PR review comments
2022-08-11 09:38:44 +02:00
Doug Lauder
9d5c54ac3a
move rest API for changepassword to personal server routes (#3634) 2022-08-10 20:08:05 +02:00
Scott Bishel
ba7e453bde
GH-3621- Make query case insensitive (#3623)
* make check case insensitive

* Fixed a server lint

Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2022-08-10 08:17:36 -06:00
Doug Lauder
c1f2ae6316
Rest API reorganization (#3624)
* reorg API

* reorg api

* fix system route

* remove newline

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-10 08:20:42 -04:00
Harshil Sharma
ab02e98831
Duplicate board retain category (#3395)
* Converted synthetic membership to natuaral if needed

* Creating duplicated board to same category as parent board

* fixed tests

* fixed an incorrect API path in client

* Added logic to prevent jumping of new board between categories

* fixed lint error
2022-08-10 16:31:34 +05:30
Harshil Sharma
08c66fbeed
Restricted scope of board-category change WS event to correct user (#3594) 2022-08-10 12:44:37 +02:00
Scott Bishel
3b099bada4
GH-3564: Change boards search to "all" words (#3622)
* make search on words 'and'

* update search in auth layer
2022-08-10 14:49:30 +05:30
Miguel de la Cruz
ad3eb4ba8b
Update teamless boards migration to check for deleted entities (#3613)
* Update teamless boards migration to check for deleted entities

After this changes, the `TeamLessBoardsMigration` will check the team
and the team membership of the users to discard deleted entities when
cosidering what team to assign a board to

* Fix linter
2022-08-09 13:04:03 +02:00
Harshil Sharma
e855a37c21
Persist category state (#3579)
* WIP

* Finished impl

* Finished impl

* Added tests

* Refactored SQL migraiton into two migration to keep DDL isolated
2022-08-08 14:55:47 -06:00
Shivashis Padhi
d50846ed42
MM-43781: boards insights - cherry pick PR suggestions (#3596)
* Uncomment team insights test

* Add checks to make sure insights endpoints work only in plugin mode

* adding constant for my insights

Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
2022-08-08 19:04:03 +05:30
Shivashis Padhi
f00b5c9e61
[MM-43781] Feature: boards insights (#3005)
* Add boilerplate functions and handlers for boards insights

* Fix function signatures to add 'duration' parameter, fix where clauses in db queries

* Fix where clause to include boards of which userId in parameter is a member

* Modify queries to work with sqlite, postgres, mysql

* Integration tests, and results of make generate

* Lint Fixes

* Add icons to board insights

* Lint fixes

* Format insights queries without squirrel to fix parameterization issues

* Add tests for sqlstore utility functions

* Improve team insights tests by creating 2 boards

* Refactor endpoints/app to adhere to developments in 7.0 release

* Refactor queries to use squirrel

* Lint fixes

* Fix client, integration tests

* Remove old integration tests

* Add storetests, refactor functions to handle authorized board_ids

* Make queries compatible with mysql, sqlite

* Add app tests

* Fix lint errors

* Revert makefile changes, fix docstring in api

* Lint fixes and doc correction suggested by @wiggin77

* Fix mock store call count error

* adding client code

* Make the following changes

 - use serviceAPI to get user.Timezone
 - rename licenseAndGuestUserCheck to insightPermissionGate, and handle returned error better
 - validate page, perPage parameters aren't < 0

* Lint fix

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local>
2022-08-08 11:42:02 +05:30
Jesús Espino
84858d2466
Allow to search only for linkable boards (#3553)
* Allow to search only for linkable boards

* Adding permissions tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-05 10:32:19 -06:00
Jesús Espino
287a026dc2
Show boards with syntetic membership (#3557) 2022-08-05 10:02:19 -06:00
Scott Bishel
97818c3915
Additional fix for GetMemberForBoard returning nil,nil (#3570)
* fix panic

* remove else
2022-08-04 14:30:25 -06:00
Doug Lauder
e06513e4da
Fix panic caused by returning nil,nil in GetMemberForBoard (#3552)
* fix panic caused by returning nil,nil in GetMemberForBoard

* lint fix

* lint fix- need updated variable name

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2022-08-04 10:03:05 -06:00
Rajat Dabade
dcdea6d7a5
Unit test to GenerateBlockId for defaultTemplateId (#3518)
* Unit test to GenerateBlockId for defaultTemplateId

* Linter fixed
2022-08-03 16:38:37 -06:00
Jesús Espino
d754b498a1
Showing properly channel association in DMs and GMs (#3529) 2022-08-03 16:36:37 -06:00
Doug Lauder
1d4a2beff7
avoid panic in request error handling (#3528) 2022-08-03 11:21:55 -04:00
Doug Lauder
158f28ec29
Upgrade dependencies: mmserver, plugin-api, opengraph (#3525)
* move gowork app to root build dir

* bump versions: mattermost-server, mattermost-plugin-api, opengraph

* add go.work to .dockerignore

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-02 19:02:35 -04:00
Scott Bishel
347a1deb8f
update query to use alias (#3490) 2022-07-29 19:49:59 -06:00
Rajat Dabade
ee395d49b1
Fetching board member in parellel (#3379)
* Translated using Weblate (Malayalam)

Currently translated at 100.0% (303 of 303 strings)

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/ml/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

* Translated using Weblate (German)

Currently translated at 100.0% (312 of 312 strings)

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/de/

* Added code for fetching all the users at one time.

* Added the code for personal server users

* Update-code

* Linter fixes

* Test cases updated, some minor changes

* Update the code according to review comments

* Cypress test fix

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

Co-authored-by: Varghese Jose <varghese.jose@tutanota.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2022-07-29 14:28:00 -06:00
Rajat Dabade
5d462b8154
Custom template's default card template works (#3335)
* Translated using Weblate (Malayalam)

Currently translated at 100.0% (303 of 303 strings)

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/ml/

* Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

Update translation files

Updated by "Cleanup translation files" hook in Weblate.

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/

* Translated using Weblate (German)

Currently translated at 100.0% (312 of 312 strings)

Translation: Focalboard/webapp
Translate-URL: https://translate.mattermost.com/projects/focalboard/webapp/de/

* Resolved the issue of default template not working

* Linter fixes

* Removed defaultTemplateID from inbuild templates

Co-authored-by: Varghese Jose <varghese.jose@tutanota.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-29 11:27:18 -06:00
Jesús Espino
cd756a97f4
Add the creator of the board as a administrator of the board if it still belongs to the channel (#3454) 2022-07-28 18:45:00 +02:00
Harshil Sharma
dc59929206
Converted synthetic membership to natuaral for board's channel members (#3390)
* Converted synthetic membership to natuaral if needed

* Added unit tests for AddMemberToBoard

* Update server/app/boards_test.go

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>

* Fix test

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-27 15:34:52 -06:00
Miguel de la Cruz
6616a16569
Move category creation and UUID update to a more performant data migration (#3437)
* Move category creation and UUID update to a more performant data migration

* Fix linter

* Fix linter
2022-07-27 23:21:19 +02:00
Harshil Sharma
36a073eaad
Handled err in acse of lack of user-channel membership (#3378)
* Handled err in acse of lack of user-channel membership

* Used errors.As instead of type check

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-27 12:17:38 -06:00
Miguel de la Cruz
ac717490ca
Replace query with exec on database update queries (#3420) 2022-07-27 09:23:04 +02:00
Miguel de la Cruz
e31821501c
Adds more loglines to the database migrations and fixes some inconsistencies (#3392)
* Adds more loglines to the database migrations and fixes some inconsistencies

* Fix linter

* Add migration engine loglines
2022-07-22 15:58:52 +02:00
Miguel de la Cruz
a5a7981b2b
Updates the id of the migration lock (#3406) 2022-07-22 11:52:36 +02:00
Doug Lauder
93ae3f239a
Add disable_notify flag for InsertBlocks API (#3384)
* disable_notify flag for InsertBlocks API

* fix linter error
2022-07-19 10:26:01 -05:00
Miguel de la Cruz
e1c747d08b
Update Boards version to 7.3 (#3382) 2022-07-18 12:05:59 -06:00
Miguel de la Cruz
4b0fb92fba
Multi product architecture (#3381)
- provides support for compiling Boards directly into the Mattermost suite server
- a ServicesAPI interface replaces the PluginAPI to allow for implementations coming from pluginAPI and suite server.
- a new product package provides a place to register Boards as a suite product and handles life-cycle events
- a new boards package replaces much of the mattermost-plugin logic, allowing this to be shared between plugin and product
- Boards now uses module workspaces; run make setup-go-work
2022-07-18 13:21:57 -04:00
Miguel de la Cruz
3d753a15e5
Fix mock early finish issue on test helpers (#3374) 2022-07-15 08:34:36 -04:00
Miguel de la Cruz
d093eef2d9
Revert "Multi product architecture (#3309)" (#3373)
This reverts commit 605c0079eb.
2022-07-15 08:04:35 +02:00
Doug Lauder
605c0079eb
Multi product architecture (#3309)
* skeleton lifecycle

* bare minimum to satisfy mm-server import

* added boards_imports.go

* move boards_imports.go to correct package

* bump mmserver version; remove replace in go.mod; use module workspaces; remove logger service

* rename product.go --> boards.go

* add FileInfoStore and Cloud services for product; create minimal pluginAPI interfaces for all packages

* rename Boards -> BoardsProduct

* compile success

* remove hooks service; guard for nil BoardsApp

* update to latest mmserver ver

* upgrade mmserver to master tip

* upgrade mmserver to master tip

* bump plugin-api to master tip

* fix users service

* fix OnActivate crash; normalize AppError returns

* fileBackend interface for server/app

* feature flag

* bump mmserver version

* fix linter errors

* make go.work when linting

* fix go.work creation for CI

* add execute flag for script

* fix more linter errors

* always create a go.work

* fix ci go.work

* OS agnostic go.work generator

* fix path

* fix path again

* partially disable cypress test

* fix case Id --> ID

* bump mmserver version

* include  in go.work for dev

* addressed review comments.

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-15 07:51:50 +02:00
Miguel de la Cruz
3ae821d2e8
Refactor websockets state and lifecycle (#3315)
* Refactor websockets state and lifecycle

This PR moves the state of the authentication and subscriptions to the
websockets client, allowing for multiple components to communicate
with it and request subscriptions independently. With this change, the
lifecycle of the websockets client is now managed on a component, and
a hook is provided for easy access to it from individual components.

* Fix linter

* Integrating the new websockets in channels integration with the RHS and board selector

* Some small fixes around boards-channels relationship

* Make the boards unfurl to always use the current team

* Fixing weird behaviors in websockets and other small data related bugs in channel-board relationship

* Only warn if withWebSockets is used without a base connection

* Fix tests

* Fix linter

* Update snapshot

* Fixing plugin tests

Co-authored-by: Jesús Espino <jespinog@gmail.com>
2022-07-14 12:31:51 +02:00
Harshil Sharma
cdf8fbc280
Fixed a bug causing undeleted board to not have original title (#3354) 2022-07-13 11:51:48 +05:30
Scott Bishel
573ea54153
add BoardID to limited card (#3341) 2022-07-11 14:01:46 +02:00
Scott Bishel
22aae37dd1
User updates (#3244)
* retrieve additional user fields

* implement config setting

* cleanup

* fix tests

* remove unused constant

* fix more tests

* add tests, cleanup

* lint fixes

* revert bad lint fixes

* more merge fixes

* update to use personal setting

* add user settings

* update package-lock.json

* lint fixes

* npm audit fix

* update tests

* Revert "lint fixes"

This reverts commit 6a50d335ca.

* Revert "update package-lock.json"

This reverts commit 1117e557e4.

* Revert "npm audit fix"

This reverts commit 77ea931c77.

* Revert "Revert "lint fixes""

This reverts commit 3ebd81b9fa.

* restore to original

* fix for empty prefs

* fix bad merge

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-08 08:43:43 -06:00
Miguel de la Cruz
06c1ae41a9
Add loggin on cloud limits set (#3337) 2022-07-08 13:23:35 +02:00
Scott Bishel
6a65f6caa3
fix bad query field (#3331) 2022-07-07 13:36:22 -06:00
Jesús Espino
46fdbf9048
Initial Boards+Channels implementation (#3110)
* Initial Boards+Channels implementation

* Adding draft code to list the boards in a channel

* Adding the hability to link/unlink channels (fake channel for now)

* Simplify slight the migrations

* WIP

* More changes to improve the implementation

* Adding partial implementation of linking channel from board

* Allow linking in both directions

* Removing unused file

* More work on channel binding

* some refactoring

* Improving code quality and interface

* More improvements

* Changing the API to search channels

* Adding a limit of 10 channels in search

* Add confirmation on linking public channels

* Improve a bit the styling of the confirmation modal

* Showing the current linked channel

* Adding link board confirmation to channel interface

* Fixing tests and linter errors

* Fixing backend tests

* Adding permissions tests

* Fixing linter errors

* Fixing small things

* Fixing some typescript errors

* Adding new boardSelectorItem tests

* Improving a bit tests

* Adding jest unit tests

* Remove duplicated implementation (from merge, I guess)

* Adding missed files

* Addressing some of the PR review comments

* Removing unneeded new wrapIntl implementation

* Moving NotSupportedError to the store package to be share between all the store implementations or layers

* Fixing one of the pendings ToDo

* Creating a constructor for the NotSupportedError

* Fixing linter error
2022-07-07 16:46:53 +02:00
Harshil Sharma
88ad387166
Using actual WS action (#3314) 2022-07-06 14:12:13 +05:30
Jesús Espino
d414d5cc5e
Showing only the right boards in the board switcher (#2971)
* Showing only the right boards board switcher

* Adding unit tests

* Fix linter error

* Addressing PR review changes

* Fixing compilation problem

* Fixing a couple of query errors

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
2022-07-05 12:56:22 +05:30
Scott Bishel
429a4e484d
add coalesce around boards description (#3289) 2022-06-29 16:17:11 -06:00
Harshil Sharma
9e3e3b5ef7
Added constant template IDs for tracking template usage (#3238)
* Added template ID to templates

* Removed debug log statements

* Removed debug log statements

* Fixed tests

* Generated template tracking ID on runtime

* MD5 is okay

* Fixed webapp tests

* Fixed webapp tests

* Fixed a big and tracked only in-built templates

* Fixed test
2022-06-29 19:47:54 +05:30
Harshil Sharma
2ac56dbfba
Ported view limits to main (#3252)
* Ported view limits to main

* lint fix

* Added tests

* Added tests

* Fixed a server test

* fixed webapp test

* fixed webapp test

* fixing some tests

* implement check when duplicating views

* Fixed webapp tests

* Fixed webapp tests

* Fixed webapp tests

* Trying without race test

* Lets race again

* Made error descriptive

* Minor improvements

* Updates snapshots for changed alt text

* Updates snapshots for changed alt text

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2022-06-29 18:05:24 +05:30
Rajat Dabade
853c2950f5
Cherry pick to main for add board link in bot notification (#3272)
Co-authored-by: Varghese Jose <varghese.jose@tutanota.com>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: jprusch <rs@schaeferbarthold.de>
2022-06-24 12:39:04 +05:30
Scott Bishel
2f0c1235bb
don't copy 'comment' blocks (#3267)
* don't copy 'comment' blocks

* update tests

* lint fixes
2022-06-22 15:57:27 -06:00
Doug Lauder
39c1d07974
Update 000017_add_file_info.up.sql (#3266)
Make CREATE TABLE idempotent.
2022-06-22 12:51:06 -04:00
Scott Bishel
34e7f88f53
add cyclo complexity, update migrate() to use defer (#3257) 2022-06-21 09:12:55 -06:00
Scott Bishel
3e9219ab0f
GH-3050 - Fix deleting empty property (#3249)
* remove check for blocks on patch, a delete may not have blocks

* remove no longer necessary tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-20 14:16:02 -06:00
Harshil Sharma
ed79026578
Fix failure to upgrade from 7.0 to 7.2 (#3240)
* WIP

* Removed placeholder migrationa s no longer needed

* Removed placeholder migrationa s no longer needed
2022-06-16 12:55:48 +02:00
Harshil Sharma
6d243e1c0e
Registered personal-server specific APIs only when running as personal server (#3228) 2022-06-16 16:16:35 +05:30
Miguel de la Cruz
fa6de94070
Adds limits implementation to the server (#3213)
* Adds limits implementation to the server

* Add test for deleted boards on active card count
2022-06-15 12:17:44 +02:00
Doug Lauder
e4231198d5
Multi product architecture (#3218)
* skeleton lifecycle

* bare minimum to satisfy mm-server import
2022-06-14 09:00:09 -06:00
Harshil Sharma
f3faf39eaa
Forward-porting fileinfo limits (#3164)
* Updated go version

* Generated mocks

* lint fix

* lint fix

* lint fix

* backported fileinfo limits

* backported fileinfo limits

* added tests

* synced with main

* Server lint fix

* used a better name
2022-06-13 13:35:42 +05:30
Doug Lauder
95d0f37420
Migration fixes (#3196)
* simplify block.board_id population
* only create tables if not existing
* fix migration ordering
* fix min schema versions for code-based migrations
2022-06-08 10:13:56 -04:00
Harshil Sharma
2ab4e95289
Updated go version (#3189)
* Updated go version

* Generated mocks

* lint fix

* lint fix

* lint fix

* Updated gitlab builder image
2022-06-06 10:18:21 +02:00
Jesús Espino
8cefcd8e8c
Allowing subpath in development environment (#3000)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-06-03 12:10:46 +02:00
Doug Lauder
fa258fe91e
fix postgres SQL for legacyBoardFields (#3111)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-26 18:11:53 -04:00
Chen-I Lim
9eb3bd5487
Fix #3072. Add docs on how to auth to API readme. (#3102) 2022-05-25 09:19:02 -07:00
Harshil Sharma
d6e494ca29
Fixed a bug where migrations didn't run on a clean DB (#3104) 2022-05-24 09:40:34 +02:00
Prakhar Porwal
c6869df914
Added Tests for NewServer() , snapshot matching (#3037)
* Added Tests for NewServer() in webserver.go , snapshot matching

* fixed linting issue

* added test for bad base url and made changes as asked by @jespino

* fixed lint error

Co-authored-by: prakharporwal <prakharporwal@github>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-23 13:16:05 +02:00
Doug Lauder
f874c3dce3
don't redundantly send config chg messages to cluster nodes (#3090)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-19 13:59:04 -06:00
Scott Bishel
8fe007277e remove invalid assigned settings 2022-05-17 14:14:48 -06:00
Scott Bishel
aa29fd8a61
update template, remove view (#3080)
* update template, remove view

* update new template file
2022-05-16 17:04:09 -04:00
Jesús Espino
d3edf2f698
Adding the board default role for public boards (#2884)
* Adding the default role concept in the backend

* Adding the interface part

* Fix golang-ci lint errors

* Adding local permissions tests

* Address PR review comments

* Improving the code a bit

* Another small fix

* Renaming DefaultRole to MinimumRole

* Setting the minimum role at minimum to check the permissions per roles in the integration tests

* Adding the new minimum role behavior

* Fixing some tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-16 10:09:11 -06:00
Doug Lauder
11bd3720f1
Refactor notify init (#3043)
* remove unneeded store interfaces

* - reduce dependencies for notifications service
- notifications service no longer concerned with web socket notifications

gnored, and an empty message aborts the commit.

* use app to add member to board

* remove unneeded API

* remove dependency on app package

* fix webapp jest

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-05-16 11:53:41 -04:00
Scott Bishel
073ef8af75 update to version 7.2.0 2022-05-11 17:25:46 -06:00
Scott Bishel
5d5147511d update singleUser to return workspace UpdateAt as getMe User createAt 2022-05-11 14:39:51 -06:00
Doug Lauder
554a790e57
standardize env var naming (#3031) 2022-05-05 15:49:34 -04:00
Scott Bishel
31a3ba8e6a
allow duplicating cards/baords if filecopy fails (#3012)
* allow duplicating cards/baords if filecopy fails

* change back to error logs
2022-05-05 09:40:46 -06:00
Doug Lauder
1ff28087f8
GH-2469 Add board-bot to team (#3026)
* add bot to team before any mention or subscription notification
2022-05-04 16:10:26 -04:00
Scott Bishel
24ff8d5d38
update board title when duplicated (#3011) 2022-05-03 12:44:34 -06:00
Scott Bishel
f4541630e7
update for v0.17.0 (#2943) 2022-04-28 14:41:38 -06:00
Miguel de la Cruz
c08ce96076
Remove timeout from MySQL migrations (#2974) 2022-04-28 11:58:17 -06:00
Miguel de la Cruz
ae97d5c314
Move teamless data migration with the rest of data migrations and update teamless boards query (#2942)
* Move teamless data migration with the rest of data migrations

* Fix get board user teams query to work on both Postgres and MySQL
2022-04-27 13:34:02 -06:00
Miguel de la Cruz
dc07df6bc9
Update permissions migration to ensure all boards are either open or private (#2928) 2022-04-27 18:21:26 +02:00
Miguel de la Cruz
74e39fa5bf
Initialise the store with a single user flag and pass it to the migrations (#2906) 2022-04-27 15:11:27 +02:00
Scott Bishel
5efcc4dcac
Implement Boards Data Retention - Take 2 (#2859)
* implement boards data retention

* cleanup logs

* revert removal

* update logger creation
2022-04-25 12:58:08 -06:00
Doug Lauder
8a4672bd23
GH-2890 Copy files when duplicating boards (#2915)
* copy files when duplicating boards

* fix unit tests

* Update server/app/boards.go

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

* Update server/app/boards.go

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

* fix review commit

Co-authored-by: Miguel de la Cruz <mgdelacroix@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-25 10:37:57 -06:00
Miguel de la Cruz
a439d11f66
Handle jsonb fields on postgres with binary_parameters set (#2854)
* Handle jsonb fields on postgres with binary_parameters set

* Finx linter adding dot
2022-04-25 17:43:06 +02:00
Miguel de la Cruz
cda064a83a
Add team access checks (#2862) 2022-04-25 17:39:40 +02:00
Scott Bishel
c765c5ef19
return nothing, not empty object (#2909) 2022-04-25 08:54:14 -06:00
Doug Lauder
cabc15b226
reduce log level when deliverying notifications to users without permission (#2912) 2022-04-22 11:32:15 -06:00
Doug Lauder
ca5f3f65e2
call notification engine when duplicating boards (#2910) 2022-04-22 11:14:12 -06:00
Jesús Espino
f439e3474d
Merging the local_permissions tests and the permissions tests (#2908)
* Moving a lot of local tests permissions into the permissions tests

* Merging all the local permissions tests into the regular permissions tests

* Fixing golangci lint errors
2022-04-22 10:38:36 -06:00
Harshil Sharma
c64b95cf92
Updated update category-board mapping method to not rely on DB returning affected rows (#2840)
* Updated update category-board mapping method to not rely on DB returning affected rows

* Wrapped into transaction
2022-04-20 09:21:53 -06:00
Doug Lauder
936cc820ab
Standardize err not found (#2834)
* cleanup log levels

* Standardize on model.IsErrNotFound instead of the mix of error checking done previously.

* fix merge conflicts

* fix comment typo

* add description to asserts
2022-04-20 11:02:12 -04:00
Doug Lauder
99882bf197
Include plugin unit tests in CI via makefile; fix unit tests (#2848)
* include plugin unit tests in CI via makefile; fix unit tests

* include hello endpoint for unit test and web service up check
2022-04-20 11:01:40 -04:00
Harshil Sharma
183c8157cb
Removed teamID from search API (#2842) 2022-04-19 17:43:40 -06:00
Chen-I Lim
3c7fd72dcf
Local permissions test (#2839)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Add local permissions tests

* local_permissions_test with standard store

* UserID tokens, duplicate check toTeam permissions

* cleanup

* cleanup

* Fix server lint

* Update TestLocalPermissionsRegister
2022-04-19 10:00:52 -07:00
Scott Bishel
74053655b6
Revert "implement data retention for boards (#2588)" (#2843)
This reverts commit 0489de8bd3.
2022-04-19 09:18:31 -06:00
Chen-I Lim
bb7ee3851c
Fix Swagger schema for OnboardingResponse (#2838)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Fix Swagger schema
2022-04-18 22:53:41 -07:00
Harshil Sharma
50930a1cd3
Cross team search (#2829)
* WIP

* Added test

* Added snapshot

* Updated server tests

* Fixed server lint

* Fixed webapp lint

* Updated server tests
2022-04-19 10:27:14 +05:30
Chen-I Lim
958fbd28bf
Add integration tests for createBoard (#2632)
* Add integration tests for createBoard

* Update tests - no board access for nonmembers

* Fix TestCreateBoard

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-18 17:07:54 -04:00
Chen-I Lim
e9e8d64333
Add TestDuplicateBoard (#2832)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Add TestDuplicateBoard
2022-04-18 10:30:14 -07:00
Scott Bishel
0489de8bd3
implement data retention for boards (#2588)
* implement data retention for boards

* fix lint errors

* start of orphans

* add and update tests

* fixes for merge

* fix tests

* fix lint

* reset from testing

* update setting unit test variable

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-18 09:03:42 -06:00
Scott Bishel
21667aa8d0
GH-2808: fix some logging issues with share board. (#2827)
* fix some logging issues

* fix unit test

* more test fixes

* unit test
2022-04-18 08:57:42 -06:00
Doug Lauder
b47e70579b
cleanup log levels (#2824) 2022-04-18 08:21:44 -04:00
Scott Bishel
a2e7deba84
make all duplicated boards private (#2823) 2022-04-15 14:29:33 -06:00
Scott Bishel
5723709605
make board private when created from template (#2821) 2022-04-15 11:27:21 -06:00
Chen-I Lim
154c344077
Fix #2800. Add missing Swagger docs (#2801)
* Fix #2800. Add missing Swagger docs

* Add note that timestamps are  in miliseconds

* Fix merge, update docs.
2022-04-15 10:21:10 -07:00
Scott Bishel
90677ba7b8
GH 2393 Move calculationColumns from board to view (#2762)
* move calculation columns to view

* update tests

* add conversion for column calculations

* remove column_Calculations from boards and boards_history

* updates from testing

* update for sqlite

* fixes from testing

* fix lint, cleanup

* update templates,remove field from boards

* revert bad changes

* update snapshots

* Update server/services/store/sqlstore/migrations/000017_add_teams_and_boards.up.sql

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>

Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-04-14 10:33:57 -06:00
Chen-I Lim
5b423d6647
CI updates: Speed up register / login, minimize Windows tests, and add Mac tests (#2784)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Add CI for macOS

* Lower password hash during unit tests

* Add comment

* Only integration tests on Windows

* Tweak TestCreateRecurringTask timings

* Fix server-test-mini-sqlite
2022-04-13 15:36:20 -07:00
Jesús Espino
bc37e97ae9
Applying migration changes (#2752)
* Applying migration changes

* Fixing linter erros

* Restoring userID

* Updated user id length

* Update server/app/category_boards.go

* Skiped creating categories for boards belonging to DMs

* Handled private group messages as well

* fix sql error for insert_at

* fix timestamp parsing

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-04-13 16:10:53 -06:00
Doug Lauder
89cc947a21
Implement permissions specs for mentions. (#2758)
* Implement permissions specs for mentions.
- public boards: admin, editor, commenter can mention team members and auto-add them to board; guests can mention board members
- private boards:  admin, editor, commenter, guest can mention board members
- viewers cannot mention
2022-04-13 18:09:55 -04:00
Miguel de la Cruz
4c61ae9623
Update focalboard endpoints to v2 namespace (#2781) 2022-04-13 15:24:32 -05:00
Chen-I Lim
8433b9eada
Fix CI: Data tamper attempt (#2782)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Expected update time is right after insert returns
2022-04-13 12:17:30 -07:00
Chen-I Lim
3264902131
Fix #2770: Handle Windows path in import and tests (#2771)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Support Windows in import archive and tests

* Run CI on Windows too

* CI: Windows SQLite only

* Remove npm ci fromn Windows CI
2022-04-13 10:17:04 -07:00
Scott Bishel
3e9ad7b9e1
Merge pull request #2743 from mattermost/category-websocket-broadcast-fix
Broadcasting category changes only to the correct user
2022-04-13 10:07:36 -06:00
Miguel de la Cruz
59b387035f
Remove export archive from plugin header (#2779)
* Remove export archive from plugin header

* Update snapshot
2022-04-13 17:52:11 +02:00
Scott Bishel
4fb14bc653
Merge pull request #2778 from wiggin77/GH-2744_export_with_pound
GH-2744 Fix export with hash sign (#) in block title breaks export to CSV
2022-04-13 09:49:25 -06:00
Scott Bishel
a69a6f65f5
Merge pull request #2774 from mattermost/mysql-5.7-uuid-fix
Avoided using UUID() as function param for MySQL migration
2022-04-13 08:39:54 -06:00
Miguel de la Cruz
9c03838840 Use the correct endpoint for exporting all boards on a team 2022-04-13 15:04:47 +02:00
Harshil Sharma
d744d69b43 Added category change broaadcast to cluster 2022-04-13 15:46:35 +05:30
Harshil Sharma
280e38604f Merge branch 'main' into category-websocket-broadcast-fix 2022-04-13 15:09:49 +05:30
Harshil Sharma
15cac1b066 Avoided using UUID() as function param for MySQL migration 2022-04-13 12:12:50 +05:30
wiggin77
2c75097680 unit test for export board 2022-04-12 23:41:32 -04:00
Spiros Economakis
539aee6a46
Fix configuration for prometheus address (#2763)
The env variable for prometheus address is not respected as it should be set as
viper default config.

Ticket: https://mattermost.atlassian.net/browse/43295
2022-04-12 17:43:29 -04:00
Chen-I Lim
af35a8e2c2
GH 2593: Fix Windows migration (#2767)
* Upgrade npm in build-ubuntu

* npm i -S moment

* Don't upgrade npm

* macos-latest on build-mac

* Update dev-release.yml

* Fix #2593: Fix Windows migration
2022-04-12 12:17:58 -07:00
Miguel de la Cruz
c5f8b7f142
Add coalesce to template version migration (#2764) 2022-04-12 08:47:45 -04:00
Miguel de la Cruz
5f963af701 Use the right single user ID on the WS implementation 2022-04-11 19:16:16 +02:00
Scott Bishel
a19840a76a
Merge pull request #2756 from wiggin77/add_remove_unit_tests
Add unit test for GetAllBlocksForBoard; remove integration test GetSubtree
2022-04-09 08:43:31 -06:00
wiggin77
43662e3a9a Add unit test for GetAllBlocksForBoard; remove integration test GetSubtree 2022-04-08 15:57:37 -04:00
Jesús Espino
f3267e2458
Fixing delete/undelete boards (#2571)
* Fixing delete/undelete boards

* Adding permissions checks for undelete board and undelete block

* Fixing server-lint

* Handling permissions for deleted boards

* Fixing linter errors

* Fixing tests

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

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

* Fixing error message

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-04-08 13:31:28 -04:00
Doug Lauder
30e6bc477d
GH-2745 Don't init default templates when unit testing (#2748)
* Don't warn when  appears in card followed by text that is not a username

* Selectively initalize default templates for unit tests that need them to reduce test times. Reduce log noise.
2022-04-08 13:46:16 +02:00
Doug Lauder
68b623ff29
Don't warn when appears in card followed by text that is not a username (#2747) 2022-04-07 17:39:35 -04:00
Doug Lauder
ff020d85e3
Don't notify non-board members of card changes (#2718)
* Don't notify non-board members of card changes
- include permissions service in notifications backends
- use permissions service to ensure @mentions are to users on team
- use permissions service to ensure subscribers are members of board
2022-04-07 11:42:32 -04:00
Harshil Sharma
2358e3e792 Broadcasting category changes only to the correct user 2022-04-07 15:33:56 +05:30
Jesús Espino
0363357209
Simplifying the categories migration (#2739)
* Simplifying the categories migration

* A bit more of simplification

* Leaving the channel_id there because sqlite doesn't support drop columns

* Update server/services/store/sqlstore/migrations/000018_populate_categories.up.sql

* Update server/services/store/sqlstore/migrations/000019_populate_category_blocks.up.sql

* Update server/services/store/sqlstore/migrations/000018_populate_categories.up.sql

Co-authored-by: Doug Lauder <wiggin77@warpmail.net>
2022-04-06 16:15:50 -04:00
Jesús Espino
6fef5f0c92
Avoid possible problem of block history with null in the title (#2721)
* Avoid possible problem of block history with null in the title

* Making title not nullable
2022-04-06 18:55:03 +02:00
Scott Bishel
dc72e3d3bd
Merge pull request #2664 from jespino/issue-2617
Adding file size limit
2022-04-06 10:43:41 -06:00
Scott Bishel
e9ab26a641
Merge pull request #2735 from jespino/removing-unussed-methods
Removing not used code
2022-04-06 10:35:12 -06:00
Scott Bishel
286f7f0663
Merge pull request #2737 from jespino/smallfix
Removing duplicated logic
2022-04-06 10:32:38 -06:00
Jesús Espino
f9f269c21a Removing duplicated logic 2022-04-06 16:58:01 +02:00
Jesús Espino
87e84589ba Fixing cypress tests 2022-04-06 16:22:47 +02:00
Jesús Espino
c3cb4a1491 Fixing tests 2022-04-06 16:04:21 +02:00
João Aldeano
263bd92424
Refactor errorResponse to set the logger to debug if the response cod… (#2719)
* Refactor errorResponse to set the logger to debug if the response code is set to unauthorised. Fixes #2488

* Fix merge conflicts
2022-04-06 07:54:40 -04:00
Jesús Espino
bc52b2f044 Fixing golangci-lint errors 2022-04-06 13:01:45 +02:00
Jesús Espino
af5193bbd0 Removing not used code 2022-04-06 12:57:30 +02:00
Jesús Espino
e2648f516a Making error handling more precise in the server (and fixing tests) 2022-04-06 10:35:26 +02:00
Scott Bishel
140af2e52f
Merge branch 'main' into issue-2617 2022-04-05 11:56:29 -06:00
Jesús Espino
a4ef8ec6bc
Permissions integration tests (#2697)
* Initial permissions review infrastructure

* Adding more tests cases

* Modifying a bit the tests approach and adding more tests

* Adding more tests

* Adding more tests for permissions

* Adding more tests

* Adding more permissions tests

* Adding more tests

* Adding more permission checks

* Adding more permissions tests

* Adding more permission tests

* Adding more tests

* Adding subscriptions tests

* Adding more permissions tests

* Adding tests for read tokens in the files

* Update APIs and fix unit tests

* Fix linter errors

* Auto-assign category id from the database (as expected because is serial/auto_increment integer field)

* Revert "Auto-assign category id from the database (as expected because is serial/auto_increment integer field)"

This reverts commit 5c98fd76a3.

* Fixing Category scheme in postgres and MySQL

* Removing restriction about the channel_id and add it to all the databases

* Moving everything to a new migration

* Fix bad merge (?)

* Update 000021_fix_categories.up.sql

Fix Postgres ALTER COLUMN syntax

* Update 000021_fix_categories.down.sql

Fix Postgres ALTER COLUMN syntax

* Update 000021_fix_categories.up.sql

Remove unnecessary, and unsupported MODIFY COLUMNs for SQLite.

* Update 000021_fix_categories.up.sql

Remove not null from categories.channel_id

* Update 000021_fix_categories.down.sql

Migrate down removing not null from categories.channel_id

* Update 000021_fix_categories.up.sql

Fix drop not null on categories.channel_id

* Update 000021_fix_categories.down.sql

Fix down migration of drop not null from categories.channel_id.

* Restore default notification level to debug

Co-authored-by: Chen-I Lim <chenilim@gmail.com>
Co-authored-by: Chen-I Lim <46905241+chenilim@users.noreply.github.com>
2022-04-05 08:00:04 -07:00
Scott Bishel
0cff6e10b1
Merge pull request #2687 from mattermost/private-onboarding-board
Set type as private for onboarding board
2022-04-04 15:11:16 -06:00
Scott Bishel
3757c19a6d
Merge pull request #2716 from mattermost/gh-2712-fix-templates
GH-2712:Don't check team permission for GlobalTeamID
2022-04-04 09:48:09 -06:00
Jesús Espino
3eb9e469d4 Revert "Removing restriction about the channel_id and add it to all the databases"
This reverts commit b9be81b900.
2022-04-04 17:45:18 +02:00
Jesús Espino
b9be81b900 Removing restriction about the channel_id and add it to all the databases 2022-04-04 17:45:00 +02:00
Mattermod
e1dd866fba
Merge branch 'main' into private-onboarding-board 2022-04-04 18:43:24 +03:00
Jesús Espino
67dfb4e118 Merge remote-tracking branch 'origin/main' into issue-2617 2022-04-04 17:23:31 +02:00
Scott Bishel
43722df412 update formatting 2022-04-04 09:18:39 -06:00
Jesús Espino
dc5f387fb8
Add code to disble guest account access (#2690)
* Disabling guest accounts

* Using the plugin api to improve get user queries

* Fix linter errors

Co-authored-by: Scott Bishel <scott.bishel@mattermost.com>
2022-04-04 16:00:40 +02:00
Jesús Espino
c11c6e9b3f
Merge branch 'main' into gh-2712-fix-templates 2022-04-04 10:15:34 +02:00
Scott Bishel
e1c894b7bb
GH-2675 Remove deprecated Apis (#2685)
* remove deprecated apis and related code

* remove unused api from octoclient

* remove unused api from client

* remove unused code
2022-04-04 09:53:24 +02:00
Scott Bishel
c19ac24fe6
update apis to return 501 if not available for plugin (#2684) 2022-04-04 09:49:27 +02:00
Scott Bishel
283d7669f3
remove read token check from unnecessary functions (#2682) 2022-04-04 09:39:29 +02:00
Scott Bishel
e46b9749d1 lint fixes 2022-04-01 14:41:31 -06:00
Scott Bishel
f20b0cdca6 don't check team permission for GlobalTeamID 2022-04-01 13:42:30 -06:00
Mattermod
1e1ad3994f
Merge branch 'main' into GH-2443_follow_button_broken 2022-04-01 17:29:34 +03:00
wiggin77
9a2cea7113 fix broken Follow button 2022-03-31 19:15:46 -04:00
Scott Bishel
2d356c696b
Merge pull request #2702 from mattermost/gh-2678-shared-files
GH-2678 Update handleServeFile to allow readtoken
2022-03-31 16:34:21 -06:00
Scott Bishel
c098eda254 update handleServeFile to allow readtoken 2022-03-31 15:02:49 -06:00
wiggin77
92a5c3605e fix unit test 2 2022-03-31 15:11:44 -04:00
wiggin77
69b4baa7ec fix unit test 2022-03-31 14:45:41 -04:00
wiggin77
d862e66af4 fix archive import 2022-03-31 14:04:20 -04:00
Harshil Sharma
806bb8e1a6 Fixed tests 2022-03-31 15:14:57 +05:30
Harshil Sharma
03cf9f815f Fixed tests 2022-03-31 13:58:30 +05:30
Harshil Sharma
bc5b7437aa Merge branch 'main' into private-onboarding-board 2022-03-31 11:32:40 +05:30
Harshil Sharma
fa1860a4a8 lint fix 2022-03-31 10:52:21 +05:30
Harshil Sharma
31c027afe1 Used gobal team ID 2022-03-31 10:38:23 +05:30
Harshil Sharma
eedfe427e2 Used gobal team ID 2022-03-31 10:33:40 +05:30
Doug Lauder
fb52a7fa1d
Merge branch 'main' into private-templates 2022-03-30 18:17:44 -04:00
Doug Lauder
a5565dcfa1
Generate templates archive at build time (#2577) 2022-03-30 18:10:11 -04:00
Mattermod
5a8665d2a1
Merge branch 'main' into private-templates 2022-03-30 18:10:16 +03:00
Harshil Sharma
90081cfdaa Minor comment 2022-03-30 14:16:11 +05:30
Harshil Sharma
d82fb1127f Set type as private for onboarding board 2022-03-30 14:15:07 +05:30
Doug Lauder
8541c3a356
Merge branch 'main' into issue-2617 2022-03-29 21:59:10 -04:00
Chen-I Lim
9f82537f9e
Add TestGetTemplates integration test (#2635)
* Add TestGetTemplates integration test

* Use t.Logf instead of fmt

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-29 15:55:39 -07:00
Chen-I Lim
c3a4921ac3
GetBoardMetadata API (#2569)
* 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>

* GetBoardMetadata API

* Integration tests. WIP

* getBoardHistory

* Working integration test

* Fix ordering, add store tests

* Fix: Update board_history update_at on patch

* sqltests

* Fix unmarshall delete boards_history

* testGetBlockMetadata with delete and undelete

* Handle board not found

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

* Fixing property creation (#2563)

* Cleanup

* 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

* Remove debug log

* Return metadata for deleted boards

* 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

* License check

* Cleanup and update Swagger docs

* Merge from main

* Fix bad merge

* Fix Linux-app build break

* do mod tidy

* Fix server lint

* Require credentials (not only read token)

* Add missing defer CloseRows

* do mod tidy

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: Jesús Espino <jespinog@gmail.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-29 14:47:49 -07:00
Jesús Espino
4fe810748f Adding integration tests for the file size limit 2022-03-29 15:56:57 +02:00
Jesús Espino
837859838c Adding max file size limit 2022-03-29 13:25:16 +02:00
Jesús Espino
8212e5401e
Add Members History support (#2595)
* Adding Members History support

* Adding unit tests for boards members history

* Changing insert_at to a milliseconds from epoch field

* Addressing PR review comment

* Addressing PR review comment

* Fix golangci-lint

* Fix migrations in postgres

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-03-29 10:17:19 +02:00