45 Commits

Author SHA1 Message Date
Adarnof
1b4f5e4e88 Adarnof's Little Things (#547)
* Port to Django 1.10
Initial migrations for current states of all models. Requires faking to retain data.
Removed all references to render_to_response, replacing with render shortcut.
Same for HttpResponseRedirect to render shortcut.
Corrected notification signal import to wait for app registry to finish loading.

* Correct typos from render conversion

* Modify models to suppress Django field warnings

* Script for automatic database conversion
 - fakes initial migrations to preserve data
Include LOGIN_URL setting

* Correct context processor import typo

* Removed pathfinder support.
Current pathfinder versions require SSO, not APIs added to database.
Conditionally load additional database definitions only if services are enabled.
Prevents errors when running auth without creating all possible databases.

* Condense context processors

* Include Django 1.10 installation in migrate script
Remove syncdb/evolve, replace with migrate for update script

* Replaced member/blue perms with user state system
Removed sigtracker
Initial migrations for default perms and groups
Removed perm bootstrapping on first run

* Clean up services list

* Remove fleet fittings page

* Provide action feedback via django messaging
Display unread notification count
Correct left navbar alignment

* Stop storing service passwords.
Provide them one time upon activation or reset.
Closes #177

* Add group sync buttons to admin site
Allow searcing of AuthServicesInfo models
Display user main character

* Correct button CSS to remove underlines on hover

* Added bulk actions to notifications
Altered notification default ordering

* Centralize API key validation.
Remove unused error count on API key model.
Restructure API key refresh task to queue all keys per user and await completion.
Closes #350

* Example configuration files for supervisor.
Copy to /etc/supervisor/conf.d and restart to take effect.
Closes #521
Closes #266

* Pre-save receiver for member/blue state switching
Removed is_blue field
Added link to admin site

* Remove all hardcoded URLs from views and templates
Correct missing render arguments
Closes #540

* Correct celeryd process directory

* Migration to automatically set user states.
Runs instead of waiting for next API refresh cycle. Should make the transition much easier.

* Verify service accounts accessible to member state

* Restructure project to remove unnecessary apps.
(celerytask, util, portal, registraion apps)
Added workarounds for python 3 compatibility.

* Correct python2 compatibility

* Check services against state being changed to

* Python3 compatibility fixes

* Relocate x2bool py3 fix

* SSO integration for logging in to existing accounts.

* Add missing url names for fleetup reverse

* Sanitize groupnames before syncing.

* Correct trailing slash preventing url resolution

* Alter group name sanitization to allow periods and hyphens

* Correct state check on pre_save model for corp/alliance group assignment

* Remove sigtracker table from old dbs to allow user deletion

* Include missing celery configuration

* Teamspeak error handling

* Prevent celery worker deadlock on async group result wait

* Correct active navbar links for translated urls.
Correct corp status url resolution for some links.
Remove DiscordAuthToken model.
2016-10-16 18:01:14 -04:00
moriartyj
812268211c Added Discord nickname syncing with EVE alliance character name (#525) 2016-09-03 23:13:54 -04:00
Csaba Turek
319567f1ac "update authorization header" fix (#514) 2016-08-06 17:23:21 -04:00
Adarnof
9435db4a32 update authorization header
include token_type as required by recent API changes
2016-08-05 22:58:08 -04:00
Adarnof
e0693e7ca8 use 404 to test user not on server 2016-06-15 21:42:26 -04:00
Adarnof
2da3cbfb70 correct guild members endpoint url 2016-06-14 00:37:07 -04:00
Adarnof
54731d4aea correct user deletion headers 2016-06-13 10:42:19 -04:00
Adarnof
1fd423e20f Discord OAuth Integration (#468)
* Implement Discord OAuth
 - extend group caching to Discord
 - use bot token to manipulate api
 - migrate to official API
Addresses #419

* Remove virtualenv wrapper

* Discord OAuth integration playtest corrections
Closes #419
2016-06-13 00:16:27 +00:00
moriartyj
cce4361eeb Allows automatic update of Discord avatar to EVE avatar (#450)
* Automatic rejection of old API IDs

* Added API ID fudge factor

* Added toggle-able options for api key rejection

* Clarified ValidationError message

* Allows automatic update of Discord avatar to EVE avatar
2016-06-02 21:17:52 +00:00
Adarnof
1164b8d984 Revert "Revert discord manager to restore functionality" 2016-02-11 12:44:54 -05:00
Adarnof
54331d9075 Corrected token deletion 2016-02-09 12:50:25 +00:00
Adarnof
b9f322e136 Re-removed exc_info flags from logging messages 2016-02-09 12:37:11 +00:00
Adarnof
e5d8c62674 Rolled back Discord managers to fix #235
Commit chosen: 08cd2c1f1ade6845f5710329b0beab47ab7df6aa
Additional security implemented: tokens deleted for users after succesful addition to discord server.
 - prevents another user from authenticating with their email and wrong password
2016-02-09 12:32:08 +00:00
Adarnof
2db7a71e9d Removed exc_info kwarg from logger.exception statements 2016-01-31 19:42:01 +00:00
Adarnof
2c6ca5f273 Assign user to discordauthtoken for security
- prevents exploit of another user entering incorrect password for email yet passing validation using existing token mentioned in #146
 - does not protect against same user entering wrong password (I can live with this.)
Periodic task to remove invalid token every 2 hours
2016-01-05 22:53:52 +00:00
Adarnof
08cd2c1f1a Corrections for typos in logging.
Rephrased EveManager exceptions to reflect determination id is not of type rather than failure of function.
2016-01-03 20:08:44 +00:00
Adarnof
3f359ecae1 Logging added to all service managers.
Unrelated, getting ImportError when trying to start shell. I broke something.
2015-12-29 22:44:17 +00:00
Adarnof
087dc24344 Another correction to logging for discord manager. 2015-12-29 19:58:16 +00:00
Adarnof
ab7017094e Corrected logger string formatting for update groups. 2015-12-29 19:48:09 +00:00
Adarnof
604c08b3b7 Discord Auth Token caching implemented to work around rate limits.
Addresses #146
2015-12-29 19:36:28 +00:00
Adarnof
834cd8865e Added console logging output. 2015-12-28 20:21:17 +00:00
Adarnof
55fc69cf8d Basic logging for Discord account creation and database updating. 2015-12-28 06:50:13 +00:00
Adarnof
d7e336d8b6 Attempted hotfix for #134 and likely #127
Reverts #119 in an attempt to prevent infinite group creation on Discord server.
2015-12-04 22:10:07 +00:00
Adarnof
f0a70a1d05 Removed incomplete function.
Closes #120.
2015-12-02 17:24:20 +00:00
Adarnof
b08cfd7409 Intelligently produces group listing. Halves the time required to create account.
Closes #119
2015-12-02 06:39:24 +00:00
Adarnof
f342569f16 Corrected reference to wrong manager in group creation. 2015-12-02 04:22:48 +00:00
Adarnof
b9db6fc38c Reduced number of api calls to improve response time. 2015-12-02 03:22:18 +00:00
Adarnof
563967bf0d Updated form to a password input for security.
DiscordManager now strips groups before kicking. This prevents server owners from keeping groups if they connect account with auth.
2015-12-02 01:39:06 +00:00
Adarnof
a388e2595e Cleaned up redundant functions. 2015-12-02 01:18:59 +00:00
Adarnof
8442ec1f55 Changed discord account handling. Now requests email and password and grabs UID via API.
UID is stored in authserviceinfo model and used as required.
2015-12-02 01:02:13 +00:00
Adarnof
ec1b17df25 Dissociates user account from email address when deleting service. 2015-12-01 07:56:13 +00:00
Adarnof
f6ef741e63 Added password change function as reset action. 2015-12-01 06:55:33 +00:00
Adarnof
9e72422639 Corrected typo in register_user function preventing succesful registration. 2015-12-01 06:13:06 +00:00
Adarnof
54d216bdf0 Changed how user account deletions are handled.
Now bans/unbans account as necessary.
2015-12-01 04:50:14 +00:00
Adarnof
7461501d41 Corrected parameter list for user registration. 2015-12-01 04:28:17 +00:00
Adarnof
c009420536 Included Discord in disable_services from common_task.
Changed how user accounts in discord are handled: endpoint accepts password and email.
Accounts are created with a password(random) and their user email. Need to activate account through link in email.
2015-12-01 04:12:50 +00:00
Adarnof
90522a5053 Changed default group permission to:
- Read Messages
 - Send Messages
 - Embed Links
 - Read Message History
 - Connect
 - Speak
 - Use Voice Activity
2015-12-01 03:25:48 +00:00
Adarnof
bec690ad51 Deletes invites once user registered as Discord ignores max_age right now. 2015-12-01 00:42:04 +00:00
Adarnof
728a18b763 Corrected default invite parameters to increase security: 5 minute lifetime, 1 use. 2015-12-01 00:37:54 +00:00
Adarnof
d3c8189c92 Corrected Discord user deletion logic.
Fixed Discord account reset.
2015-11-30 23:51:39 +00:00
Adarnof
d9ffaa5e50 Initial work on reset discord account. 2015-11-30 23:41:44 +00:00
Adarnof
a6447d3596 Added link to discord server to services page.
Corrected handling of user deletion to return true if account absent on server.
2015-11-30 23:01:44 +00:00
Adarnof
34a27ba885 Added syncgroup logic to celery tasks.
Wrote request handles for enabling and disabling discord user.
2015-11-30 22:08:17 +00:00
Adarnof
c51b8c77e6 Consolidated API manager and service manager.
Initial service functions added to DiscordManager.
2015-11-30 21:47:06 +00:00
Adarnof
7e05054854 Initial work on Discord integration.
Manually created REST API manager as per the documented functions.
Attempting to integrade discord-py wrapper, unsuccesful thusfar.
Addresses #88
2015-11-30 03:44:38 +00:00