Commit graph

64 commits

Author SHA1 Message Date
PCoder
93041f4539 Update changelog 2019-02-03 14:13:46 +01:00
PCoder
6abb78db2d Update .gitignore 2019-02-03 14:11:56 +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
a2550e4bff Remove redundant code 2019-02-03 13:43:23 +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
PCoder
f3d90a2b7d Add utility code to get max UID
Other changes:
- Introduce logging
- Introduce .env config parameters
  - LDAP_SEARCH_BASE: The base used in the LDAP search to find uid
  - IPV6_WORK_USER_GROUP: The LDAP group to which the newly added
      user should belong to
2019-02-03 12:59:22 +01:00
PCoder
8e07151837 Add ldap3 specific logging 2019-02-03 10:22:17 +01:00
PCoder
c670eb52e9 Fix bug reading boolean config casting 2019-02-03 10:20:00 +01:00
PCoder
78098a3692 Update changelog 2019-02-03 10:15:29 +01:00
PCoder
38c7283cb6 Enable logging by setting by setting ENABLE_DEBUG_LOG in .env
Also set the modules to log by using `MODULES_TO_LOG` config
parameter in .env
2019-02-03 10:13:18 +01:00
PCoder
bbb6f3290d Add CHANGELOG.md 2019-02-02 22:40:22 +01:00
PCoder
fd2491145a Remove Search and Tags links from the navbar 2019-02-02 22:33:54 +01:00
PCoder
f112b85f17 Reorganize imports 2019-02-02 22:32:33 +01:00
PCoder
1e457ea1f0 Remove ipv6middleware 2019-02-02 22:08:09 +01:00
PCoder
21228e14bb Rename uwsgi.ini to uwsgi.ini.sample 2019-01-27 20:44:57 +01:00
PCoder
f4c5ad660f Merge 2019-01-27 17:50:43 +01:00
da4e6cea16 Initial commit 2019-01-27 17:43:38 +01:00
PCoder
472f6a352f Update requirements.txt 2019-01-27 17:16:38 +01:00
PCoder
598004efa9 Add .idea to .gitignore 2019-01-27 17:16:04 +01:00
PCoder
7151564b28 Remove unneeded items from footer 2019-01-27 17:15:22 +01:00
4e460726dd use x-real-ip headers 2018-11-29 19:48:02 +05:45
8594e604fc add logo 2018-11-28 18:22:35 +05:45
307f25efb7 fix index page link 2018-11-17 11:24:28 +05:45
3a76ab9a76 use session_cookie_name 2018-11-17 11:21:18 +05:45
3fd4273b5f add media and static url based on script_name 2018-11-17 11:01:57 +05:45
635b929b24 remove static from git 2018-11-17 10:59:25 +05:45
1287105067 add CSRF_TRUSTED_ORIGINS 2018-11-17 10:57:15 +05:45
d8705d4946 make force_script_name configurable 2018-11-16 22:29:47 +05:45
216a5c3c9f force script name so it works behind proxy_pass 2018-11-16 21:09:34 +05:45
bca7a22085 fix dn generation 2018-11-16 20:38:20 +05:45
b4bf9318df configurable database backend 2018-11-16 20:27:21 +05:45
081e11400b use signup view rather than redirecting 2018-11-16 19:42:07 +05:45
dd8701409a add logout button 2018-11-16 19:41:53 +05:45
453cdf86c4 Dockerfile changes for ldap 2018-11-10 11:26:12 +05:45
a932682102 add python-ldap to requirements, was missing 2018-11-10 11:19:39 +05:45
67464b906f landing page changes 2018-11-10 11:14:33 +05:45
ed99dad379 link signup to account.ungleich.ch, landing page changes 2018-11-10 10:52:50 +05:45
b6f5fd5882 flake8 fixes 2018-11-03 18:10:34 +05:45
c42160193e ensure ipv4/ipv6 test is included 2018-11-03 17:57:43 +05:45
241ad0deac Be able to come back to home page by clicking on logo/ipv6.work button on the left 2018-11-03 10:18:40 +05:45
eab9d7b714 add ldap authentication and function to create ldap user on signup 2018-11-03 10:09:11 +05:45
be949448c5 display 3 jobs in home 2018-10-26 15:20:08 +05:45
d13d3f53d5 create management command to create test users, use it in Docker 2018-10-26 15:08:49 +05:45
d3ade15c9a add python decouple 2018-10-26 14:55:13 +05:45
730b02f673 track static resources folder 2018-10-26 14:42:11 +05:45