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

Autogenerate public_html dirs #187

Merged
merged 3 commits into from
Jun 11, 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
5 changes: 5 additions & 0 deletions apps/newuser/config_newuser
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ echo $2 > /nfs/homes/$1/.forward
chown -R $3:1000 /nfs/homes/$1
echo $2 | add_members -r - Csua-newmembers
if ($4); then echo $2 | add_members -r - Jobs; fi

#this is for creating the public_html folder and link
mkdir -m 755 /nfs/public_html/$1
chown -R $3:1000 /nfs/public_html/$1
ln -s /csua/public_html/$1 /nfs/homes/$1/public_html
2 changes: 1 addition & 1 deletion apps/newuser/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class NewUserForm(forms.Form):
validators=[validate_username_chars, validate_username_not_in_use]
)
password = forms.CharField(widget=forms.PasswordInput())
#enroll_jobs = forms.BooleanField(required=False, label="Jobs@ List Opt-in")
# enroll_jobs = forms.BooleanField(required=False, label="Jobs@ List Opt-in")
agree_rules = forms.BooleanField(required=True)

def clean(self):
Expand Down
4 changes: 2 additions & 2 deletions apps/newuser/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def _make_newuser(request, form, context):
"""Creates a new user in LDAP and runs config_newuser
if config_newuser fails, the user account is deleted to prevent the user
account from being in limbo."""
#enroll_jobs = "true" if form.cleaned_data["enroll_jobs"] else "false"
#disabling temporarily before the mailman3 migration
# enroll_jobs = "true" if form.cleaned_data["enroll_jobs"] else "false"
# disabling temporarily before the mailman3 migration
enroll_jobs = "false"
success, uid = create_new_user(
form.cleaned_data["username"],
Expand Down