Skip to content

[Feature:System] Self Account Creation#10097

Merged
bmcutler merged 198 commits into
mainfrom
9982-self-account-creation
Jul 18, 2025
Merged

[Feature:System] Self Account Creation#10097
bmcutler merged 198 commits into
mainfrom
9982-self-account-creation

Conversation

@RitaLei123

@RitaLei123 RitaLei123 commented Jan 9, 2024

Copy link
Copy Markdown
Contributor

Please check if the PR fulfills these requirements:

  • Tests for the changes have been added/updated (if possible)
  • Documentation has been updated/added if relevant
  • Screenshots are attached to Github PR if visual/UI changes were made

What is the current behavior?

Related to #9982
Submitty is looking to add support for 'Submitty as a Service', a cloud hosted example version, so we need to allow for users to create accounts to log into Submitty with.

What is the new behavior?

If when installing Submitty, you use DatabaseAuthentication, and say 'yes' to self user account creation, on the login page, there is a button to a form to create a new user account.

imageimage

Other information?

See Docs for switching Authentication type
for help on how to review.
Switch to DatabaseAuthentication.
Add the following to /usr/local/submitty/config/submitty.json

"user_create_account": true,
"user_id_requirements": {
        "any_user_id": true,
        "require_name": false,
        "min_length": 6,
        "max_length": 25,
        "name_requirements": {
            "given_first": false,
            "given_name": 2,
            "family_name": 4
        },
        "require_email": false,
        "email_requirements": {
            "whole_email": false,
            "whole_prefix": false,
            "prefix_count": 6
        },
      "accepted_emails": [
            "gmail.com"
      ]
}

@RitaLei123 RitaLei123 linked an issue Jan 9, 2024 that may be closed by this pull request
5 tasks
@RitaLei123 RitaLei123 self-assigned this Jan 9, 2024
@github-actions

Copy link
Copy Markdown

This PR has been inactive (no commits and no review comments) for 12 days. If there is no new activity in the next 48 hours, this PR will be labeled as Abandoned PR - Needs New Owner and either another developer will finish the PR or it will be closed.

@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jan 26, 2024
@micpap25 micpap25 self-assigned this May 31, 2024
@micpap25 micpap25 removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label May 31, 2024
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jun 8, 2024
Todos are included, needs someone with experience on auth
@micpap25 micpap25 removed their assignment Jul 2, 2024
@IDzyre IDzyre self-assigned this Jul 12, 2024
@IDzyre IDzyre removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jul 12, 2024
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jul 15, 2024
@williamjallen williamjallen removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jul 15, 2024

@bmcutler bmcutler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tested it, and after manually changing the configs (would be easier if I actually read the docs) I thought it was working, but after I entered the verification code I got this frog robot:
Screenshot 2025-07-08 at 11 40 05 AM

(Maybe something is bugged about my configuration, but it should fail earlier if there is an admin config error)

Comment thread .setup/CONFIGURE_SUBMITTY.py
Comment thread .setup/CONFIGURE_SUBMITTY.py
Comment thread migration/migrator/data/submitty_db.sql
Comment thread .setup/CONFIGURE_SUBMITTY.py
@IDzyre

IDzyre commented Jul 9, 2025

Copy link
Copy Markdown
Member

I tested it, and after manually changing the configs (would be easier if I actually read the docs) I thought it was working, but after I entered the verification code I got this frog robot: Screenshot 2025-07-08 at 11 40 05 AM

(Maybe something is bugged about my configuration, but it should fail earlier if there is an admin config error)

This is fixed, I forgot to remove a line in the Doctrine entity file.

@bmcutler bmcutler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I haven't reviewed all the code in detail, but I tested it and I'm happy to merge it.

Except it's not passing the linter tests

And your PR notes don't include the need to add "accepted_emails" array.
And actually I have a small requested change for the config file.

This is what I used:

"user_id_requirements": {
"any_user_id": true,
"require_name": false,
"min_length": 6,
"max_length": 25,
"name_requirements": {
"given_first": false,
"given_name": 2,
"family_name": 4
},
"require_email": false,
"email_requirements": {
"whole_email": false,
"whole_prefix": false,
"prefix_count": 6
}
},
"accepted_emails" : [
"gmail.com"
]

I think the acepted_emails array should actually be nested inside of the "user_id_requirements" block. NOTE: It didn't work when I tried that.

@IDzyre IDzyre moved this from Work in Progress to Seeking Reviewer in Submitty Development Jul 17, 2025
@bmcutler
bmcutler merged commit ac51a6f into main Jul 18, 2025
26 checks passed
@bmcutler
bmcutler deleted the 9982-self-account-creation branch July 18, 2025 15:12
@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Done in Submitty Development Jul 18, 2025
williamschen23 pushed a commit that referenced this pull request Jul 18, 2025
### Please check if the PR fulfills these requirements:


* [ ] Tests for the changes have been added/updated (if possible)
* [ ] Documentation has been updated/added if relevant
* [x] Screenshots are attached to Github PR if visual/UI changes were
made

### What is the current behavior?
Related to #9982
Submitty is looking to add support for 'Submitty as a Service', a cloud
hosted example version, so we need to allow for users to create accounts
to log into Submitty with.

### What is the new behavior?
If when installing Submitty, you use DatabaseAuthentication, and say
'yes' to self user account creation, on the login page, there is a
button to a form to create a new user account.


![image](https://github.com/user-attachments/assets/0af8871f-8748-405f-b0c4-452cf24988e3)![image](https://github.com/user-attachments/assets/698afb6a-19d9-48cf-b5d6-59bbece59d8a)

### Other information?
<!-- Is this a breaking change? -->
<!-- How did you test -->
See [Docs for switching Authentication
type](https://submitty.org/developer/development_instructions/miscellaneous)
for help on how to review.  
Switch to DatabaseAuthentication.
Add the following to `/usr/local/submitty/config/submitty.json`
```json
"user_create_account": true,
"user_id_requirements": {
        "any_user_id": true,
        "require_name": false,
        "min_length": 6,
        "max_length": 25,
        "name_requirements": {
            "given_first": false,
            "given_name": 2,
            "family_name": 4
        },
        "require_email": false,
        "email_requirements": {
            "whole_email": false,
            "whole_prefix": false,
            "prefix_count": 6
        },
      "accepted_emails": [
            "gmail.com"
      ]
}
```

---------

Co-authored-by: Michael Papadopoulos <[email protected]>
Co-authored-by: IDzyre <[email protected]>
Co-authored-by: Cameron Peterson <[email protected]>
Co-authored-by: Barb Cutler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Self Account Creation