Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions auth/grants.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,29 @@ import (
)

type VideoGrant struct {
// actions on rooms
// ---- actions on rooms

// ability to create rooms, typically used only for CreateRoom API
RoomCreate bool `json:"roomCreate,omitempty"`
RoomList bool `json:"roomList,omitempty"`
// ability to retrieve read-only information about rooms
RoomList bool `json:"roomList,omitempty"`
// ability to record any room
// this permission is too broad, and will be replaced by roomEgress, which is applied to a specific room
RoomRecord bool `json:"roomRecord,omitempty"`
// actions on ingresses
IngressAdmin bool `json:"ingressAdmin,omitempty"` // applies to all ingress

// ---- actions on a single room

// actions on a particular room
RoomAdmin bool `json:"roomAdmin,omitempty"`
RoomJoin bool `json:"roomJoin,omitempty"`
Room string `json:"room,omitempty"`
Room string `json:"room,omitempty"`
// can token holder perform admin operations on the room
RoomAdmin bool `json:"roomAdmin,omitempty"`
// can token holder join the room as a participant
RoomJoin bool `json:"roomJoin,omitempty"`
// can start egress sessions from the room
RoomEgress bool `json:"roomEgress,omitempty"`

// ---- activity allowed by a participant with roomJoin

// permissions within a room, if none of the permissions are set explicitly
// it will be granted with all publish and subscribe permissions
Expand All @@ -44,8 +58,7 @@ type VideoGrant struct {
// by default, a participant is not allowed to update its own metadata
CanUpdateOwnMetadata *bool `json:"canUpdateOwnMetadata,omitempty"`

// actions on ingresses
IngressAdmin bool `json:"ingressAdmin,omitempty"` // applies to all ingress
// ---- attributes on a participant

// participant is not visible to other participants
Hidden bool `json:"hidden,omitempty"`
Expand Down
21 changes: 4 additions & 17 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,7 @@ fi

go mod download

GO_VERSION=`go version | { read _ _ v _; echo ${v#go}; }`
GO_TARGET_VERSION=1.17

function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

if [ $(version $GO_VERSION) -ge $(version $GO_TARGET_VERSION) ];
then
go install github.com/twitchtv/twirp/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go install github.com/livekit/psrpc/[email protected]
else
go get -u github.com/twitchtv/twirp/[email protected]
go get -u google.golang.org/protobuf/cmd/[email protected]
go get -u google.golang.org/grpc/cmd/[email protected]
go get -u github.com/livekit/psrpc/[email protected]
fi
go install github.com/twitchtv/twirp/[email protected]
go install google.golang.org/protobuf/cmd/[email protected]
go install google.golang.org/grpc/cmd/[email protected]
go install github.com/livekit/psrpc/[email protected]
Loading