@@ -2408,20 +2408,6 @@ func (q *querier) InsertWorkspaceAgentMetadata(ctx context.Context, arg database
2408
2408
return q .db .InsertWorkspaceAgentMetadata (ctx , arg )
2409
2409
}
2410
2410
2411
- func (q * querier ) InsertWorkspaceAgentPortShare (ctx context.Context , arg database.InsertWorkspaceAgentPortShareParams ) (database.WorkspaceAgentPortShare , error ) {
2412
- w , err := q .db .GetWorkspaceByID (ctx , arg .WorkspaceID )
2413
- if err != nil {
2414
- return database.WorkspaceAgentPortShare {}, err
2415
- }
2416
-
2417
- // inserting a workspace port share is more akin to just updating the workspace.
2418
- if err = q .authorizeContext (ctx , rbac .ActionUpdate , w .RBACObject ()); err != nil {
2419
- return database.WorkspaceAgentPortShare {}, xerrors .Errorf ("authorize context: %w" , err )
2420
- }
2421
-
2422
- return q .db .InsertWorkspaceAgentPortShare (ctx , arg )
2423
- }
2424
-
2425
2411
func (q * querier ) InsertWorkspaceAgentScripts (ctx context.Context , arg database.InsertWorkspaceAgentScriptsParams ) ([]database.WorkspaceAgentScript , error ) {
2426
2412
if err := q .authorizeContext (ctx , rbac .ActionCreate , rbac .ResourceSystem ); err != nil {
2427
2413
return []database.WorkspaceAgentScript {}, err
@@ -3063,20 +3049,6 @@ func (q *querier) UpdateWorkspaceAgentMetadata(ctx context.Context, arg database
3063
3049
return q .db .UpdateWorkspaceAgentMetadata (ctx , arg )
3064
3050
}
3065
3051
3066
- func (q * querier ) UpdateWorkspaceAgentPortShare (ctx context.Context , arg database.UpdateWorkspaceAgentPortShareParams ) error {
3067
- w , err := q .db .GetWorkspaceByID (ctx , arg .WorkspaceID )
3068
- if err != nil {
3069
- return err
3070
- }
3071
-
3072
- // updating a workspace port share is more akin to just updating the workspace.
3073
- if err = q .authorizeContext (ctx , rbac .ActionUpdate , w .RBACObject ()); err != nil {
3074
- return xerrors .Errorf ("authorize context: %w" , err )
3075
- }
3076
-
3077
- return q .db .UpdateWorkspaceAgentPortShare (ctx , arg )
3078
- }
3079
-
3080
3052
func (q * querier ) UpdateWorkspaceAgentStartupByID (ctx context.Context , arg database.UpdateWorkspaceAgentStartupByIDParams ) error {
3081
3053
agent , err := q .db .GetWorkspaceAgentByID (ctx , arg .ID )
3082
3054
if err != nil {
@@ -3343,6 +3315,10 @@ func (q *querier) UpsertTailnetTunnel(ctx context.Context, arg database.UpsertTa
3343
3315
return q .db .UpsertTailnetTunnel (ctx , arg )
3344
3316
}
3345
3317
3318
+ func (q * querier ) UpsertWorkspaceAgentPortShare (ctx context.Context , arg database.UpsertWorkspaceAgentPortShareParams ) (database.WorkspaceAgentPortShare , error ) {
3319
+ panic ("not implemented" )
3320
+ }
3321
+
3346
3322
func (q * querier ) GetAuthorizedTemplates (ctx context.Context , arg database.GetTemplatesWithFilterParams , _ rbac.PreparedAuthorized ) ([]database.Template , error ) {
3347
3323
// TODO Delete this function, all GetTemplates should be authorized. For now just call getTemplates on the authz querier.
3348
3324
return q .GetTemplatesWithFilter (ctx , arg )
0 commit comments