web/satellite: add "public linksharing URL"

* Update defaults for gateway credentials URL and linksharing URL to use
  storjsatelliteshare.io instead of storjshare.io
* Add new config for "public linksharing URL" and set it to
  link.storjshare.io
* Use "private" linksharing URL for actions within the object browser
* Use "public" linksharing URL for sharing files externally

Resolves https://github.com/storj/storj/issues/5805

Change-Id: I2c8fbd04141755b4751dcf4d054253a7ff8d6cf3
This commit is contained in:
Moby von Briesen 2023-05-15 16:18:34 -04:00 committed by Storj Robot
parent a2a603aee8
commit 19cb08b025
5 changed files with 21 additions and 8 deletions

View File

@ -29,6 +29,7 @@ type FrontendConfig struct {
CouponCodeSignupUIEnabled bool `json:"couponCodeSignupUIEnabled"` CouponCodeSignupUIEnabled bool `json:"couponCodeSignupUIEnabled"`
FileBrowserFlowDisabled bool `json:"fileBrowserFlowDisabled"` FileBrowserFlowDisabled bool `json:"fileBrowserFlowDisabled"`
LinksharingURL string `json:"linksharingURL"` LinksharingURL string `json:"linksharingURL"`
PublicLinksharingURL string `json:"publicLinksharingURL"`
PathwayOverviewEnabled bool `json:"pathwayOverviewEnabled"` PathwayOverviewEnabled bool `json:"pathwayOverviewEnabled"`
Captcha console.CaptchaConfig `json:"captcha"` Captcha console.CaptchaConfig `json:"captcha"`
AllProjectsDashboard bool `json:"allProjectsDashboard"` AllProjectsDashboard bool `json:"allProjectsDashboard"`

View File

@ -80,7 +80,7 @@ type Config struct {
PartneredSatellites Satellites `help:"names and addresses of partnered satellites in JSON list format" default:"[{\"name\":\"US1\",\"address\":\"https://us1.storj.io\"},{\"name\":\"EU1\",\"address\":\"https://eu1.storj.io\"},{\"name\":\"AP1\",\"address\":\"https://ap1.storj.io\"}]"` PartneredSatellites Satellites `help:"names and addresses of partnered satellites in JSON list format" default:"[{\"name\":\"US1\",\"address\":\"https://us1.storj.io\"},{\"name\":\"EU1\",\"address\":\"https://eu1.storj.io\"},{\"name\":\"AP1\",\"address\":\"https://ap1.storj.io\"}]"`
GeneralRequestURL string `help:"url link to general request page" default:"https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000379291"` GeneralRequestURL string `help:"url link to general request page" default:"https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000379291"`
ProjectLimitsIncreaseRequestURL string `help:"url link to project limit increase request page" default:"https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000683212"` ProjectLimitsIncreaseRequestURL string `help:"url link to project limit increase request page" default:"https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000683212"`
GatewayCredentialsRequestURL string `help:"url link for gateway credentials requests" default:"https://auth.storjshare.io" devDefault:"http://localhost:8000"` GatewayCredentialsRequestURL string `help:"url link for gateway credentials requests" default:"https://auth.storjsatelliteshare.io" devDefault:"http://localhost:8000"`
IsBetaSatellite bool `help:"indicates if satellite is in beta" default:"false"` IsBetaSatellite bool `help:"indicates if satellite is in beta" default:"false"`
BetaSatelliteFeedbackURL string `help:"url link for for beta satellite feedback" default:""` BetaSatelliteFeedbackURL string `help:"url link for for beta satellite feedback" default:""`
BetaSatelliteSupportURL string `help:"url link for for beta satellite support" default:""` BetaSatelliteSupportURL string `help:"url link for for beta satellite support" default:""`
@ -89,7 +89,8 @@ type Config struct {
CouponCodeSignupUIEnabled bool `help:"indicates if user is allowed to add coupon codes to account from signup" default:"false"` CouponCodeSignupUIEnabled bool `help:"indicates if user is allowed to add coupon codes to account from signup" default:"false"`
FileBrowserFlowDisabled bool `help:"indicates if file browser flow is disabled" default:"false"` FileBrowserFlowDisabled bool `help:"indicates if file browser flow is disabled" default:"false"`
CSPEnabled bool `help:"indicates if Content Security Policy is enabled" devDefault:"false" releaseDefault:"true"` CSPEnabled bool `help:"indicates if Content Security Policy is enabled" devDefault:"false" releaseDefault:"true"`
LinksharingURL string `help:"url link for linksharing requests" default:"https://link.storjshare.io" devDefault:"http://localhost:8001"` LinksharingURL string `help:"url link for linksharing requests within the application" default:"https://link.storjsatelliteshare.io" devDefault:"http://localhost:8001"`
PublicLinksharingURL string `help:"url link for linksharing requests for external sharing" default:"https://link.storjshare.io" devDefault:"http://localhost:8001"`
PathwayOverviewEnabled bool `help:"indicates if the overview onboarding step should render with pathways" default:"true"` PathwayOverviewEnabled bool `help:"indicates if the overview onboarding step should render with pathways" default:"true"`
AllProjectsDashboard bool `help:"indicates if all projects dashboard should be used" default:"false"` AllProjectsDashboard bool `help:"indicates if all projects dashboard should be used" default:"false"`
GeneratedAPIEnabled bool `help:"indicates if generated console api should be used" default:"false"` GeneratedAPIEnabled bool `help:"indicates if generated console api should be used" default:"false"`
@ -523,6 +524,7 @@ func (server *Server) frontendConfigHandler(w http.ResponseWriter, r *http.Reque
CouponCodeSignupUIEnabled: server.config.CouponCodeSignupUIEnabled, CouponCodeSignupUIEnabled: server.config.CouponCodeSignupUIEnabled,
FileBrowserFlowDisabled: server.config.FileBrowserFlowDisabled, FileBrowserFlowDisabled: server.config.FileBrowserFlowDisabled,
LinksharingURL: server.config.LinksharingURL, LinksharingURL: server.config.LinksharingURL,
PublicLinksharingURL: server.config.PublicLinksharingURL,
PathwayOverviewEnabled: server.config.PathwayOverviewEnabled, PathwayOverviewEnabled: server.config.PathwayOverviewEnabled,
DefaultPaidStorageLimit: server.config.UsageLimits.Storage.Paid, DefaultPaidStorageLimit: server.config.UsageLimits.Storage.Paid,
DefaultPaidBandwidthLimit: server.config.UsageLimits.Bandwidth.Paid, DefaultPaidBandwidthLimit: server.config.UsageLimits.Bandwidth.Paid,

View File

@ -254,7 +254,7 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# console.frame-ancestors: tardigrade.io storj.io # console.frame-ancestors: tardigrade.io storj.io
# url link for gateway credentials requests # url link for gateway credentials requests
# console.gateway-credentials-request-url: https://auth.storjshare.io # console.gateway-credentials-request-url: https://auth.storjsatelliteshare.io
# url link to general request page # url link to general request page
# console.general-request-url: https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000379291 # console.general-request-url: https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000379291
@ -271,8 +271,8 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# url link to let us know page # url link to let us know page
# console.let-us-know-url: https://storjlabs.atlassian.net/servicedesk/customer/portals # console.let-us-know-url: https://storjlabs.atlassian.net/servicedesk/customer/portals
# url link for linksharing requests # url link for linksharing requests within the application
# console.linksharing-url: https://link.storjshare.io # console.linksharing-url: https://link.storjsatelliteshare.io
# number of times user can try to login without penalty # number of times user can try to login without penalty
# console.login-attempts-without-penalty: 3 # console.login-attempts-without-penalty: 3
@ -310,6 +310,9 @@ compensation.withheld-percents: 75,75,75,50,50,50,25,25,25,0,0,0,0,0,0
# url link to project limit increase request page # url link to project limit increase request page
# console.project-limits-increase-request-url: https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000683212 # console.project-limits-increase-request-url: https://supportdcs.storj.io/hc/en-us/requests/new?ticket_form_id=360000683212
# url link for linksharing requests for external sharing
# console.public-linksharing-url: https://link.storjshare.io
# number of events before the limit kicks in # number of events before the limit kicks in
# console.rate-limit.burst: 5 # console.rate-limit.burst: 5

View File

@ -164,9 +164,9 @@ async function setShareLink(): Promise<void> {
path = encodeURIComponent(path.trim()); path = encodeURIComponent(path.trim());
const linksharingURL = configStore.state.config.linksharingURL; const publicLinksharingURL = configStore.state.config.publicLinksharingURL;
link.value = `${linksharingURL}/${credentials.accessKeyId}/${path}`; link.value = `${publicLinksharingURL}/${credentials.accessKeyId}/${path}`;
} catch (error) { } catch (error) {
await notify.error(error.message, AnalyticsErrorEventSource.SHARE_BUCKET_MODAL); await notify.error(error.message, AnalyticsErrorEventSource.SHARE_BUCKET_MODAL);
} finally { } finally {

View File

@ -93,6 +93,13 @@ const linksharingURL = computed((): string => {
return configStore.state.config.linksharingURL; return configStore.state.config.linksharingURL;
}); });
/**
* Returns public linksharing URL from store.
*/
const publicLinksharingURL = computed((): string => {
return configStore.state.config.publicLinksharingURL;
});
/** /**
* Generates a URL for an object map. * Generates a URL for an object map.
*/ */
@ -128,7 +135,7 @@ async function generateShareLinkUrl(path: string): Promise<string> {
await analytics.eventTriggered(AnalyticsEvent.LINK_SHARED); await analytics.eventTriggered(AnalyticsEvent.LINK_SHARED);
return `${linksharingURL.value}/${credentials.accessKeyId}/${path}`; return `${publicLinksharingURL.value}/${credentials.accessKeyId}/${path}`;
} catch (error) { } catch (error) {
await notify.error(error.message, AnalyticsErrorEventSource.UPLOAD_FILE_VIEW); await notify.error(error.message, AnalyticsErrorEventSource.UPLOAD_FILE_VIEW);