diff --git a/satellite/console/config.go b/satellite/console/config.go index 976d97567..e0b1625dd 100644 --- a/satellite/console/config.go +++ b/satellite/console/config.go @@ -22,6 +22,7 @@ type Config struct { FailedLoginPenalty float64 `help:"incremental duration of penalty for failed login attempts in minutes" default:"2.0"` ProjectInvitationExpiration time.Duration `help:"duration that project member invitations are valid for" default:"168h"` UnregisteredInviteEmailsEnabled bool `help:"indicates whether invitation emails can be sent to unregistered email addresses" default:"false"` + FreeTierInvitesEnabled bool `help:"indicates whether free tier users can send project invitations" default:"false"` UserBalanceForUpgrade int64 `help:"amount of base units of US micro dollars needed to upgrade user's tier status" default:"10000000"` PlacementEdgeURLOverrides PlacementEdgeURLOverrides `help:"placement-specific edge service URL overrides in the format {\"placementID\": {\"authService\": \"...\", \"publicLinksharing\": \"...\", \"internalLinksharing\": \"...\"}, \"placementID2\": ...}"` BlockExplorerURL string `help:"url of the transaction block explorer" default:"https://etherscan.io/"` diff --git a/satellite/console/consoleweb/config.go b/satellite/console/consoleweb/config.go index 76e92cb52..6a75ccf17 100644 --- a/satellite/console/consoleweb/config.go +++ b/satellite/console/consoleweb/config.go @@ -52,6 +52,7 @@ type FrontendConfig struct { ObjectBrowserPaginationEnabled bool `json:"objectBrowserPaginationEnabled"` BillingFeaturesEnabled bool `json:"billingFeaturesEnabled"` UnregisteredInviteEmailsEnabled bool `json:"unregisteredInviteEmailsEnabled"` + FreeTierInvitesEnabled bool `json:"freeTierInvitesEnabled"` } // Satellites is a configuration value that contains a list of satellite names and addresses. diff --git a/satellite/console/consoleweb/server.go b/satellite/console/consoleweb/server.go index c5d3fe3a3..bd7b31476 100644 --- a/satellite/console/consoleweb/server.go +++ b/satellite/console/consoleweb/server.go @@ -753,6 +753,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque ObjectBrowserPaginationEnabled: server.config.ObjectBrowserPaginationEnabled, BillingFeaturesEnabled: server.config.BillingFeaturesEnabled, UnregisteredInviteEmailsEnabled: server.config.UnregisteredInviteEmailsEnabled, + FreeTierInvitesEnabled: server.config.FreeTierInvitesEnabled, } err := json.NewEncoder(w).Encode(&cfg) diff --git a/satellite/console/service.go b/satellite/console/service.go index 4677c8c5f..22281543e 100644 --- a/satellite/console/service.go +++ b/satellite/console/service.go @@ -3775,7 +3775,7 @@ func (s *Service) inviteProjectMembers(ctx context.Context, sender *User, projec } projectID = isMember.project.ID - if !sender.PaidTier { + if !(s.config.FreeTierInvitesEnabled || sender.PaidTier) { return nil, ErrNotPaidTier.New(paidTierInviteErrMsg) } diff --git a/scripts/testdata/satellite-config.yaml.lock b/scripts/testdata/satellite-config.yaml.lock index 695a5be78..4fedc7e35 100755 --- a/scripts/testdata/satellite-config.yaml.lock +++ b/scripts/testdata/satellite-config.yaml.lock @@ -280,6 +280,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0 # allow domains to embed the satellite in a frame, space separated # console.frame-ancestors: tardigrade.io storj.io +# indicates whether free tier users can send project invitations +# console.free-tier-invites-enabled: false + # server address of the front-end app # console.frontend-address: :10200 diff --git a/web/satellite/src/components/modals/AddTeamMemberModal.vue b/web/satellite/src/components/modals/AddTeamMemberModal.vue index 6517167e9..0cdd36c92 100644 --- a/web/satellite/src/components/modals/AddTeamMemberModal.vue +++ b/web/satellite/src/components/modals/AddTeamMemberModal.vue @@ -8,21 +8,21 @@
- - Add a team member to contribute to this project. + + Upgrade now to unlock collaboration and bring your team together in this project. - Upgrade now to unlock collaboration and bring your team together in this project. + Add a team member to contribute to this project.
Invite a team member to join you in this project.