Skip to content

Commit

Permalink
Fixes mozilla-services#5185 - Access settings page directly from url
Browse files Browse the repository at this point in the history
  • Loading branch information
punamdahiya committed Nov 20, 2018
1 parent acecc07 commit 90cef3b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions locales/en-US/server.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,9 @@ copyImageErrorMessage = Unable to copy your shot to the clipboard.
settingsDisconnectButton = Disconnect
.title = Disconnect
settingsGuestAccountMessage = Guest Account
settingsSignInInvite = Sign in to sync across devices
settingsSignInButton = Sign In
.title = Sign in
SettingsPageHeader = Firefox Screenshots Settings
settingsDescription = You can sign in with Firefox Accounts to sync all your screenshots across devices and access them privately.
settingsFirefoxAccountSubHeader = Firefox Account
settingsClosePreferences =
.title = Close preferences
Expand Down
4 changes: 2 additions & 2 deletions server/src/pages/settings/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const app = express();
exports.app = app;

app.get("/", function(req, res) {
if (!(req.deviceId || req.accountId)) {
res.status(403).send("You must have Screenshots installed");
if (!req.accountId) {
res.redirect("/");
return;
}
if (req.originalUrl === "/settings/") {
Expand Down
8 changes: 0 additions & 8 deletions server/src/pages/settings/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,12 @@ class Body extends React.Component {
<Localized id="settingsGuestAccountMessage">
<p className="title">Guest Account</p>
</Localized>
<Localized id="settingsSignInInvite">
<p className="info">Sign in to sync across devices</p>
</Localized>
<Localized id="settingsSignInButton" attrs={{title: true}}>
<a className="account-buttons" href="/api/fxa-oauth/login/" onClick={ this.onClickConnect.bind(this)} title="Sign in">Sign In</a>
</Localized>
</div>
</div>
);
subInfo = (
<Localized id="settingsDescription">
<p className="sub-info">You can sign in with Firefox Accounts to sync all your screenshots across devices and access them privately.</p>
</Localized>
);
}
return <div className="preferences">
<Localized id="SettingsPageHeader">
Expand Down

0 comments on commit 90cef3b

Please sign in to comment.