Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed setup to allow for requireLogin #693

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading