mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +02:00
Added check for to-be-added user into team (#4515)
Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
parent
c718633bb0
commit
06984c7856
@ -150,6 +150,11 @@ func (a *API) handleAddMember(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if !a.permissions.HasPermissionToTeam(reqBoardMember.UserID, board.TeamID, model.PermissionViewTeam) {
|
||||
a.errorResponse(w, r, model.NewErrPermission("access denied to team"))
|
||||
return
|
||||
}
|
||||
|
||||
newBoardMember := &model.BoardMember{
|
||||
UserID: reqBoardMember.UserID,
|
||||
BoardID: boardID,
|
||||
|
Loading…
Reference in New Issue
Block a user