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

Create admin during installation, allow multiple admins #1602

Merged
merged 150 commits into from
Dec 25, 2022
Merged

Conversation

qwerty287
Copy link
Contributor

@qwerty287 qwerty287 commented Nov 26, 2022

Requires #1539 to be merged.

  • create the admin user during installation
  • add command to create new users
  • allow multiple admins (in theory, untested)

TODO

  • add installation step to create user
  • add command to create user
  • remove related legacy code
  • fix code and tests to not longer assert that admin is user with ID 0
  • fix tests (does not find tables users and sym_links !?)
  • increment all user IDs (no longer use ID 0 to fix Laravel issues)
  • Add command to reset the password of a user (useful if you are locked out of admin)
  • remove old code
  • Password confirmation check on admin creation.

@ildyria
Copy link
Member

ildyria commented Dec 23, 2022

At initial admin user creation, there need to be a password validation check, namely a second password field to confirm that the password is entered properly as chosen (to avoid typos mistakes etc).

Ideally there needs to be a visual feedback that the button has been clicked.
See in: resources/views/update/error.blade.php (does not need to be the same but similar)

	<!-- Do not change even a single character in the block below without
	     also updating the checksum in config/secure-headers.php! -->
	<script>
	document.addEventListener("DOMContentLoaded", function(event) {
		document.querySelector("form").addEventListener("submit", function(e){
			document.querySelector("form").hidden = true;
			var text = document.createElement("div");
			text.innerHTML = "Migration started. <b>DO NOT REFRESH THE PAGE</b>.";
			document.querySelector(".form").appendChild(text);
			// e.preventDefault();    //stop form from submitting
		});
	});
	</script>

qwerty287 and others added 2 commits December 23, 2022 17:40
@qwerty287
Copy link
Contributor Author

Ideally there needs to be a visual feedback that the button has been clicked.
See in: resources/views/update/error.blade.php (does not need to be the same but similar)

I'd do this in another PR and get this one out first,

Base automatically changed from apply-rights-naming-convention to master December 23, 2022 21:25
@qwerty287 qwerty287 marked this pull request as ready for review December 24, 2022 08:19
@qwerty287 qwerty287 requested a review from a team December 24, 2022 08:31
Copy link
Member

@ildyria ildyria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ildyria ildyria merged commit baddcfd into master Dec 25, 2022
@ildyria ildyria deleted the user-installation branch December 25, 2022 09:28
@ildyria ildyria mentioned this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants