mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
feat: add queries for PGCoord HTMLDebug (#10913)
Adds queries for implementing HTMLDebug on the new PGCoordinator
This commit is contained in:
@ -881,6 +881,27 @@ func (q *querier) GetAllTailnetClients(ctx context.Context) ([]database.GetAllTa
|
||||
return q.db.GetAllTailnetClients(ctx)
|
||||
}
|
||||
|
||||
func (q *querier) GetAllTailnetCoordinators(ctx context.Context) ([]database.TailnetCoordinator, error) {
|
||||
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceTailnetCoordinator); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return q.db.GetAllTailnetCoordinators(ctx)
|
||||
}
|
||||
|
||||
func (q *querier) GetAllTailnetPeers(ctx context.Context) ([]database.TailnetPeer, error) {
|
||||
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceTailnetCoordinator); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return q.db.GetAllTailnetPeers(ctx)
|
||||
}
|
||||
|
||||
func (q *querier) GetAllTailnetTunnels(ctx context.Context) ([]database.TailnetTunnel, error) {
|
||||
if err := q.authorizeContext(ctx, rbac.ActionRead, rbac.ResourceTailnetCoordinator); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return q.db.GetAllTailnetTunnels(ctx)
|
||||
}
|
||||
|
||||
func (q *querier) GetAppSecurityKey(ctx context.Context) (string, error) {
|
||||
// No authz checks
|
||||
return q.db.GetAppSecurityKey(ctx)
|
||||
|
Reference in New Issue
Block a user