Skip to content

Commit

Permalink
Merge pull request #187 from CSUA/oski-bear-patch-1
Browse files Browse the repository at this point in the history
Autogenerate public_html dirs
  • Loading branch information
oski-bear authored Jun 11, 2024
2 parents 6a42fb1 + 0a8d209 commit 00d66cc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
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

0 comments on commit 00d66cc

Please sign in to comment.