mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-21 13:38:56 +02:00
e3ae682eea
* initial commit for displaying board statistics * lint fixes * i18n-extract, remove log entries, cleanup * more lint fixes * add check for standalone mode * update tests due to change to NotImplemented * lint fix * revert removing empty comment lines Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
25 lines
930 B
Go
25 lines
930 B
Go
//go:generate mockgen -destination=mocks/mockstore.go -package mocks . Store
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package permissions
|
|
|
|
import (
|
|
"github.com/mattermost/focalboard/server/model"
|
|
|
|
mmModel "github.com/mattermost/mattermost-server/v6/model"
|
|
)
|
|
|
|
type PermissionsService interface {
|
|
HasPermissionTo(userID string, permission *mmModel.Permission) bool
|
|
HasPermissionToTeam(userID, teamID string, permission *mmModel.Permission) bool
|
|
HasPermissionToChannel(userID, channelID string, permission *mmModel.Permission) bool
|
|
HasPermissionToBoard(userID, boardID string, permission *mmModel.Permission) bool
|
|
}
|
|
|
|
type Store interface {
|
|
GetBoard(boardID string) (*model.Board, error)
|
|
GetMemberForBoard(boardID, userID string) (*model.BoardMember, error)
|
|
GetBoardHistory(boardID string, opts model.QueryBoardHistoryOptions) ([]*model.Board, error)
|
|
}
|