registration icon indicating copy to clipboard operation
registration copied to clipboard

Feature Request: Remove Registration link on Login Page

Open thisiszeev opened this issue 1 year ago • 11 comments

This is a feature request, so I didn't find it required to provide all the debug info.

I want to invite clients, staff and contractors to register on our Nextcloud Server. I do not want the link on the login page as I do not want to keep having to delete new accounts that were not authorized.

An added benefit, would be to generate an invitation email from the admin panel, where there is a unique URI taking the recipient to the registration page.

thisiszeev avatar Feb 17 '24 16:02 thisiszeev

I wonder if this shouldn't just be provided by the Nextcloud user creation assistant itself, allowing to create an invitation from an email address.

tcitworld avatar Feb 28 '24 16:02 tcitworld

Oh, that would be a wonderful opportunity. We are currently using the "Custom CSS" app to remove the Register button from the login page.

NeverLoseHope777 avatar Mar 20 '24 10:03 NeverLoseHope777

Oh, that would be a wonderful opportunity. We are currently using the "Custom CSS" app to remove the Register button from the login page.

Please tell me how you achieved this... my custom css code keeps getting over written by the flexbox.

thisiszeev avatar Apr 09 '24 13:04 thisiszeev

I wonder if this shouldn't just be provided by the Nextcloud user creation assistant itself, allowing to create an invitation from an email address.

May I suggest and option to issue a customized invitation by email?

I am actually going to clone the repo and see if I am able to figure it out, but my PHP skills are a bit rusty. I only restarted coding in PHP a few months ago, and it's been 10+ years, so it's like learning to ride my motorcycle all over again.

thisiszeev avatar Apr 09 '24 13:04 thisiszeev

Oh, that would be a wonderful opportunity. We are currently using the "Custom CSS" app to remove the Register button from the login page.

Okay, I am reading through the code... I think I have worked out the easiest way to do this.

  1. Have a toggle in the admin page for signup by Invitation Only.
  2. This then disables the standard signup page and has the elements for entering an email address appear as elements on the admin page instead.
  3. Admin can then simply enter an email address, the user gets the email, but now they get a link instead of the code for verification
  4. They then click the link, get asked to fill in their details and agree to TOS.
  5. Done and dusted.

What I also think would be nice, is to auto group users based on their domain, or selecting the group when the invitation is sent.

I see most of the code is in Vue.js which is pretty easy to work with. I don't have a lot of spare time, but will tinker and see if I can get this going.

thisiszeev avatar Apr 09 '24 13:04 thisiszeev

What if a exception rule is added from the admin page toggle, that just disables one line in lib/RegistrationLoginOption.php?

If I comment out line 38

	public function getLabel(): string {
		#return $this->l->t('Register');
	}

then the link disappears from the login page, but the registration URL still works, so this is a temporary quick fix but it will be over written when the app updates...

thisiszeev avatar Apr 09 '24 14:04 thisiszeev

On my server I am leaving it commented out for now, but I am going to tinker a bit more and see if I can make it an integration from the admin page. Kind of like "if regbuttonshow=true then do this else do not do anything" type thing.

thisiszeev avatar Apr 09 '24 14:04 thisiszeev

I have made the changes to my cloned repo... I have tested it in a test install of Nextcloud. It works!!!

How do I contribute my changes so that everyone else can benefit? I have commented each place I have added code with (thisiszeev) at the end to make auditing easier.

thisiszeev avatar Apr 09 '24 18:04 thisiszeev

I have created a Pull Request

thisiszeev avatar Apr 12 '24 10:04 thisiszeev

My checks kept failing, so I have started again and created a new Pull Request

thisiszeev avatar May 23 '24 18:05 thisiszeev

Do we know who is maintaining this app?

I would kindly help out with and request a review for #664.

almereyda avatar Jun 05 '24 14:06 almereyda