Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for shared boards #2581

Merged
merged 7 commits into from
Mar 25, 2022
Merged

fixes for shared boards #2581

merged 7 commits into from
Mar 25, 2022

Conversation

sbishel
Copy link
Collaborator

@sbishel sbishel commented Mar 22, 2022

Summary

Updates necessary for Shared Boards to work with permission changes.

Ticket Link

Fixes #2502

@sbishel sbishel requested a review from a team as a code owner March 22, 2022 16:56
@sbishel sbishel requested review from harshilsharma63, chenilim and jespino and removed request for a team and chenilim March 22, 2022 16:56
@sbishel
Copy link
Collaborator Author

sbishel commented Mar 22, 2022

I discovered when running locally, you need to make sure to build the webapp and server before building the plugin. Locally, the plugins/focalboard path loads from the webapp, not the plugin.

I updated my test server to this PR. You can test it out here -
https://sbishel-test.test.mattermost.cloud/signup_user_complete/?id=gy8ukugpn3nzjdipp1cor81oro
or use normal sysadmin credentials.

}
}, [teamId, match.params.boardId, match.params.viewId])
}, [teamId, match.params.boardId, match.params.viewId, me])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: probably a super tiny optimization is to pass use the me?.id as dependency, that way your user changes doesn't necesarilly retrigger this effect.

@@ -159,9 +159,13 @@ const FocalboardRouter = (props: Props): JSX.Element => {
<ChangePasswordPage/>
</FBRoute>}

<FBRoute path='/shared/:boardId?/:viewId?/:cardId?'>
<FBRoute path='/workspace/:workspaceId/shared/:boardId?/:viewId?/:cardId?'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is here for backward compatibility, I guess, do we need the previous one (without the team or workspace) URL too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, you can use an array of paths in the path attribute, so probably makes sense to pass the array of all the valid urls that are for shared boards in one single route.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, some routes later, we have a redirect from /workspace/:workspaceId/shared/:boardId?/:viewId?/:cardId? for this specific case, so we should fix that there, I guess.

Copy link
Contributor

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of suggestions.

@sbishel
Copy link
Collaborator Author

sbishel commented Mar 24, 2022

/update-branch

@sbishel
Copy link
Collaborator Author

sbishel commented Mar 24, 2022

/update-branch

@sbishel
Copy link
Collaborator Author

sbishel commented Mar 24, 2022

/update-branch

@sbishel
Copy link
Collaborator Author

sbishel commented Mar 25, 2022

/update-branch

@sbishel sbishel merged commit 3355709 into main Mar 25, 2022
@sbishel sbishel deleted the gh-2502-fix-shareboard branch March 25, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Permissions branch: Share board not working
3 participants