Additional APIs for Focalboard multi-product architecture (#20608)

- adds HasPermissionToChannel to permissions service
- adds GetChannelsForTeamForUser to channel service
Этот коммит содержится в:
Doug Lauder
2022-07-11 13:43:15 -04:00
коммит произвёл GitHub
родитель 80779852a1
Коммит ba9f82e010
3 изменённых файлов: 16 добавлений и 2 удалений

Просмотреть файл

@@ -41,6 +41,7 @@ type PostService interface {
// The service shall be registered via app.PermissionKey service key.
type PermissionService interface {
HasPermissionToTeam(userID, teamID string, permission *model.Permission) bool
HasPermissionToChannel(askingUserID string, channelID string, permission *model.Permission) bool
}
// ClusterService enables to publish cluster events. In addition to that, It's being used for
@@ -61,6 +62,7 @@ type ChannelService interface {
GetDirectChannel(userID1, userID2 string) (*model.Channel, *model.AppError)
GetChannelByID(channelID string) (*model.Channel, *model.AppError)
GetChannelMember(channelID string, userID string) (*model.ChannelMember, *model.AppError)
GetChannelsForTeamForUser(teamID string, userID string, opts *model.ChannelSearchOpts) (model.ChannelList, *model.AppError)
}
// LicenseService provides license related utilities.