Commit graph

11 commits

Author SHA1 Message Date
PCoder
a0ecec665e Refactor code 2019-02-04 20:12:56 +01:00
PCoder
b0a09969ec Refactor LDAP_USER_DN to .env 2019-02-04 19:56:17 +01:00
PCoder
2196390d7a Handle more errors
Internal Server Error: /ipv6/work/signup/
Traceback (most recent call last):
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "./users/views.py", line 19, in signup
    create_user(username, raw_password, first_name, last_name, email)
  File "./users/ldap_funcs.py", line 18, in create_user
    uidNumber = get_max_uid() + 1
  File "./users/ldap_funcs.py", line 79, in get_max_uid
    return int(handler.read())
ValueError: invalid literal for int() with base 10: ''
2019-02-03 14:04:06 +01:00
PCoder
506679b8a0 Bugfix: TypeError: write() argument must be str, not int
Internal Server Error: /ipv6/work/signup/
Traceback (most recent call last):
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "./users/views.py", line 19, in signup
    create_user(username, raw_password, first_name, last_name, email)
  File "./users/ldap_funcs.py", line 38, in create_user
    set_max_uid(uidNumber)
  File "./users/ldap_funcs.py", line 68, in set_max_uid
    handler.write(max_uid)
TypeError: write() argument must be str, not int
2019-02-03 13:55:37 +01:00
PCoder
0fb34dc560 Save uidNumber used for the latest user created for future reference 2019-02-03 13:50:47 +01:00
PCoder
1bd4b42fe9 Bugfix: use correct setting name 2019-02-03 13:43:08 +01:00
PCoder
fd8f5fc1d3 Bugfix: use correct function and return value 2019-02-03 13:34:29 +01:00
PCoder
88a58595fb Refactor code 2019-02-03 13:31:36 +01:00
PCoder
c72f97de42 Add code to create user's unix profile also 2019-02-03 13:05:44 +01:00
bca7a22085 fix dn generation 2018-11-16 20:38:20 +05:45
eab9d7b714 add ldap authentication and function to create ldap user on signup 2018-11-03 10:09:11 +05:45