Skip to content

Commit 44e126f

Browse files
committed
move to CanRestrictShareLevel
1 parent cab9159 commit 44e126f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

coderd/agentapi/servicebanner_internal_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ import (
77

88
"golang.org/x/xerrors"
99

10+
"github.com/stretchr/testify/require"
11+
1012
agentproto "github.com/coder/coder/v2/agent/proto"
1113
"github.com/coder/coder/v2/coderd/appearance"
1214
"github.com/coder/coder/v2/codersdk"
13-
"github.com/stretchr/testify/require"
1415
)
1516

1617
func TestGetServiceBanner(t *testing.T) {

coderd/portsharing/portsharing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package portsharing
22

33
type PortSharer interface {
4-
Enabled() bool
4+
CanRestrictShareLevel() bool
55
}
66

77
type AGPLPortSharer struct{}
88

9-
func (AGPLPortSharer) Enabled() bool {
10-
return true
9+
func (AGPLPortSharer) CanRestrictShareLevel() bool {
10+
return false
1111
}
1212

1313
var DefaultPortSharer PortSharer = AGPLPortSharer{}

enterprise/coderd/portsharing/portsharing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ func NewEnterprisePortSharer() *EnterprisePortSharer {
66
return &EnterprisePortSharer{}
77
}
88

9-
func (EnterprisePortSharer) Enabled() bool {
9+
func (EnterprisePortSharer) CanRestrictShareLevel() bool {
1010
return true
1111
}

0 commit comments

Comments
 (0)