MCPcopy
hub / github.com/livekit/livekit / EnsureCreatePermission

Function EnsureCreatePermission

pkg/service/auth.go:196–202  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

194}
195
196func EnsureCreatePermission(ctx context.Context) error {
197 claims := GetGrants(ctx)
198 if claims == nil || claims.Video == nil || !claims.Video.RoomCreate {
199 return ErrPermissionDenied
200 }
201 return nil
202}
203
204func EnsureListPermission(ctx context.Context) error {
205 claims := GetGrants(ctx)

Callers 3

CreateRoomMethod · 0.85
DeleteRoomMethod · 0.85
ValidateCreateRoomMethod · 0.85

Calls 1

GetGrantsFunction · 0.85

Tested by

no test coverage detected