permissions.go
TLDR
This file contains a single method called HasPermissionToBoard
which checks if a user has a specific permission for a board.
Methods
HasPermissionToBoard
This method checks if a user has a specific permission for a board. It takes three parameters:
-
userID
(string): the ID of the user to check permissions for. -
boardID
(string): the ID of the board to check permissions on. -
permission
(pointer to mm_model.Permission): the specific permission to check for.
The method returns a boolean value indicating whether the user has the specified permission for the board.
package app
import (
mm_model "github.com/mattermost/mattermost-server/v6/model"
)
func (a *App) HasPermissionToBoard(userID, boardID string, permission *mm_model.Permission) bool {
return a.permissions.HasPermissionToBoard(userID, boardID, permission)
}