Skip to content

Commit

Permalink
Merge pull request #693 from SynBioHub/requireLoginBug
Browse files Browse the repository at this point in the history
changed setup to allow for requireLogin
  • Loading branch information
danielfang97 authored Jul 18, 2024
2 parents aac3d9f + 57fe342 commit 53995c7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion frontend/public/commitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
570de43852e519fbbfe2b65ec71ec3915e7240a3
0ccd05a418a12d5655f15cfc6d8247fee231bceb
23 changes: 17 additions & 6 deletions frontend/specialAccess/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ export default function Setup({ setInSetupMode }) {
);
const [logo, setLogo] = useState(undefined);
const [allowPublicSignup, setAllowPublicSignup] = useState(true);
const [requireLogin, setRequireLogin] = useState(false);

const [frontendURL, setFrontendURL] = useState('http://localhost:3333/');
const [instanceUrl, setInstanceUrl] = useState('http://localhost:7777/');
const [uriPrefix, setUriPrefix] = useState('http://localhost:7777/');
const [frontendURL, setFrontendURL] = useState(window.location.href);
const [instanceUrl, setInstanceUrl] = useState(window.location.href);
const [uriPrefix, setUriPrefix] = useState(window.location.href);
const [altHome, setAltHome] = useState('');

const [userName, setUserName] = useState('');
Expand Down Expand Up @@ -90,11 +91,11 @@ export default function Setup({ setInSetupMode }) {
containerStyling={styles.inputcontainer}
customType="file"
value={logo}
onChange={event => setLogo(event.target.value)}
onChange={event => setLogo(event.target.files[0])}
/>

<InputField
labelText="Allow Public Account Creation"
labelText="Allow Public Account Creation: if unchecked, accounts can only be created through invitation"
inputName="Allow Public"
containerStyling={styles.checkboxinput}
customType="checkbox"
Expand All @@ -103,6 +104,15 @@ export default function Setup({ setInSetupMode }) {
setAllowPublicSignup(event.target.checked)
}
/>

<InputField
labelText="Require Login: Require login for all operations"
value={requireLogin}
onChange={event => setRequireLogin(event.target.checked)}
inputName="Alternate Home Page"
containerStyling={styles.checkboxinput}
customType="checkbox"
/>
</div>
</div>
</div>
Expand Down Expand Up @@ -246,7 +256,8 @@ export default function Setup({ setInSetupMode }) {
virtuosoINI: '/etc/virtuoso-opensource-7/virtuoso.ini',
virtuosoDB: '/var/lib/virtuoso-opensource-7/db',
allowPublicSignup,
altHome
altHome,
requireLogin
},
{
headers
Expand Down

0 comments on commit 53995c7

Please sign in to comment.