nextcloud / registration

User registration app for Nextcloud
GNU Affero General Public License v3.0
137 stars 78 forks source link

Feature Request: Remove Registration link on Login Page #621

Open thisiszeev opened 7 months ago

thisiszeev commented 7 months ago

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.

tcitworld commented 7 months ago

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.

NeverLoseHope777 commented 6 months ago

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

thisiszeev commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

I have created a Pull Request

thisiszeev commented 4 months ago

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

almereyda commented 4 months ago

Do we know who is maintaining this app?

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