1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-21 13:38:56 +02:00
focalboard/server/services/permissions/permissions.go
Scott Bishel e3ae682eea
Display board statistics (#4025)
* 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>
2022-10-25 14:28:00 -06:00

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)
}