focalboard
focalboard copied to clipboard
Bug: Error when manually adding row to board_members table using sqlite3
Steps to reproduce the behavior
Using Docker version of focalboard. Unbeknownst to me, a user I shared my board with was creating their own boards and using them. The user has now left and I need to gain access to the boards. I tried to gain access using:
INSERT INTO board_members (board_id,user_id,scheme_admin,scheme_editor,scheme_commenter,scheme_viewer)
VALUES ('xyz','xyz',0,1,0,0);
Expected behavior
I was hoping to be able to access the board
Error
I can now see the board when searching for it, but cannot access the board. The docker logs show the following error: error getting member for board caller="localpermissions/localpermissions.go:50" boardID=xyz userID=xyz error="sql: Scan error on column index 3, name "roles": converting NULL to string is unsupported".
If I run: .schema board_members
the roles column looks empty for all rows, but I assume there is something different about it in the other rows that I didn't manually create. Unfortunately, my sqlite skills are very rudimentary!
Edition and Platform
- Edition: focalboard docker
- Version: 7.2.0
- Browser and OS: Chrome
Additional context (optional)
I would also be curios to know how to make the boards visible under "boards" rather than having to search for them. Also, is it possible to stop users from creating their own boards?
Thanks very much in advance.
Note, I was able to get around this issue by copying a current row:
INSERT INTO board_members (board_id,user_id,roles,scheme_admin,scheme_editor,scheme_commenter,scheme_viewer)
SELECT board_id,"abc",roles,scheme_admin,scheme_editor,scheme_commenter,scheme_viewer
FROM board_members
WHERE ( board_id = 'xyz' AND user_id = 'efg' );
But I'm still curious as to what I'm missing in the roles column
@SpookOz - Sorry for the delayed response.
But I'm still curious as to what I'm missing in the roles column
You were missing setting Roles = "" rather than Roles = null. The model.BoardMember
object and doesn't accept null.
I would also be curios to know how to make the boards visible under "boards" rather than having to search for them.
Not currently, but investigating, see https://github.com/mattermost/focalboard/issues/3781
Also, is it possible to stop users from creating their own boards?
Not currently, v7.4.2
adds Commenters
and Viewers
. But any user in Personal Server can create a board. Our cloud product has the concept of Guest users, those users are not allowed to create a board.
I believe this can be closed.