354 Commits

Author SHA1 Message Date
Adarnof
5738b015c3 Correct typo in exception handling 2017-01-23 23:28:55 -05:00
Adarnof
294cd6b781 Remove references to legacy jacknife setting 2017-01-20 10:00:24 -05:00
Adarnof
e8915b84e5 Get ship type name from ESI
Closes #631
2017-01-11 21:58:20 -05:00
Adarnof
8360371ab7 Enforce unique AuthServicesInfo (#618)
Alter user field to OneToOneField
Migration to enforce uniqueness pre-change
Migration to ensure all users have an AuthServicesInfo
Receiver to automatically create one upon user creation
Replace AuthServicesInfo.get_or_create with get
Prevent deletion of AuthServicesInfo from admin site
Remove add and delete permissions from model.

Get character names in chunks on corpstats update to prevent HTTP400 when requesting >350(ish) names

Include corpstats docs.
Update settings docs.
2017-01-11 21:48:20 -05:00
Adarnof
1887d612e6 Only trigger group update for saved users 2017-01-03 20:43:35 -05:00
Adarnof
a561862911 Correct TS group update on perm key refresh 2017-01-03 20:12:29 -05:00
Adarnof
56082848a7 EVE Swagger Interface (#591)
FAT uses ESI tokens to get character location/ship
 - closes #564

 Pull corp memebrship data from ESI

Additional permissions for non-api viewing.
 - migration to convert permissions from old users.

Standardize EVE datasource responses.
 - allow different sources for EVE data types.

Allow empty values for character alliance id and name

Allow multiple corps and alliances to be considered 'members'
2017-01-02 20:50:21 -05:00
Adarnof
ce35e72e44 Correct discourse group sync task calling. 2016-12-20 01:20:31 +00:00
Adarnof
046ecce8a3 Merge branch 'lock' of https://github.com/R4stl1n/allianceauth
Conflicts:
	services/managers/eve_api_manager.py
2016-12-13 20:31:13 -05:00
Adarnof
f0a3df5659 correct typo preventing disabling of discourse 2016-11-19 15:13:07 -05:00
Adarnof
b651ebed87 Discord bot requests administrator role.
Seeing as Discord can't get their roles system to work over the API, this is our only choice.
Closes #569
2016-11-13 17:18:26 -05:00
Adarnof
b4dc624b17 Correctly throw ApiInvalidError when API key deleted (222)
Do not assume keys are invalid on unrecognized codes.
Closes #574
2016-11-05 20:47:51 -04:00
Adarnof
ff5055f151 Prevent simultaneous execution of multiple group update tasks.
Prevents multiple group creation on services using group caching.
2016-11-05 16:58:23 -04:00
Basraah
dc4b4bbdf5 Wait until transaction completes to call group syncs (#571)
Prevents syncing of old groups when celery workers execute faster than db transactions can be completed.
2016-11-02 20:28:20 -04:00
Basraah
2d3055480c Fix users cannot delete mumble account (#567)
Added helper method for checking a user exists
Added a check for already deleted mumble accounts
2016-11-01 23:25:55 -04:00
Adarnof
e77c162fa0 API SSO, Beautification of Tables, and more. (#562)
# One Thousandth Commit 🎉 🎈 🎆 🍾

* Allow requiring API ownership validation by SSO.
Closes #163

* Add Discourse group name length restrictions.

* Redirect after api addition/deletion of main character

* Correct admin searching for removed discourse_username field in AuthServicesInfo

* Correct admin function to sync user Discourse groups

* Beautify tables by removing borders and hiding when empty.

*Add buttons on dead-end pages to return to originating view.
2016-10-27 23:28:00 -04:00
Adarnof
f9dd03dc0f Handle NoneType iteration errors on empty fleetup result.
Closes #558
2016-10-26 00:24:45 +00:00
Adarnof
6d2036e84b Prevent errors when deleting users before joining TS3
Closes #554
2016-10-25 22:08:28 +00:00
Adarnof
00341f8a50 Delay new Discourse user group sync to allow request to complete.
Ensures Discourse creates user model to avoid 404s when calling API.
2016-10-25 21:59:58 +00:00
Adarnof
5ee65706cb Correct discourse login for non-superusers.
Correct TS3 error handling.
Closes #554
2016-10-25 21:12:23 +00:00
Adarnof
4ff21b25c3 Discourse SSO (#560)
* Alter Discourse support to act as SSO provider.
Correct service group sync retry queueing.

* Correct default database enviroment variable names.

* Redirect to requested page after succesful login.

* Correct default redirect handling.
Correct attribute used to logout users on Discourse.
Improve logging messages to use parsed path on Discourse.

* Correct task retry syntax using bind=True.
Inherit from base exception so can catch TeamspeakErrors.
2016-10-25 14:52:12 -04:00
Adarnof
1daf77709d Abort API refresh when API servers unreachable.
Sorry aboot today.
2016-10-21 20:39:00 -04:00
Adarnof
bba36d9ae0 Correct disable_market to not require external DB call 2016-10-21 13:47:29 +00:00
Adarnof
04a11b113a Correct missing request arg for messages.
Correct disable_service tasks to remove password check.
Addresses #557
2016-10-21 13:04:05 +00:00
Adarnof
deb94c06fd prevent error being raised on OK empty response
closes #554
2016-10-18 13:45:15 -04:00
Adarnof
e242b8cfec correct dict unpacking of escape characters
closes #554
2016-10-18 13:16:17 -04:00
Adarnof
90d88c4598 avoid keyerror when determining groups to remove 2016-10-18 00:43:28 -04:00
Adarnof
f3d1fc87b2 Update views.py 2016-10-17 20:21:22 -04:00
Adarnof
31d454b1d2 include missing request args for messages 2016-10-17 19:59:39 -04:00
Adarnof
d6a522300a import EveManager
closes #550
2016-10-17 09:08:43 -04:00
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
Adarnof
b0c41598cf limit usernames to 30 characters 2016-08-10 18:40:06 -04:00
Adarnof
f119d06956 limit usernames to 30 characters 2016-08-10 18:39:31 -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
15d3a862a9 unregister depreciated DiscordAuthToken 2016-08-04 19:54:21 -04:00
moriartyj
11572fc09d fixed debug message (#509) 2016-07-29 11:51:33 -04:00
moriartyj
7e4d411685 Changed timerboard to Future/Past timers (#503) 2016-07-18 14:07:22 -04:00
Adarnof
eeea5ce14e capture error code on user deletion issues
addresses #501
2016-07-11 15:33:32 +00:00
moriartyj
cb3dd1f393 Mumble uses alliance ticker for BLUES (#479)
* Mumble uses alliance ticker for BLUES

* Move alliance ticker section for blues

* Fixed Reviewer translated link
2016-06-26 10:18:48 -04:00
iAddz
c9e490a5c5 Added German Translations (#406)
* Added German Translations

Translated using
https://docs.djangoproject.com/en/1.9/topics/i18n/translation/

Added language drop down menu's for base.html, registration & login
pages

Known issues:
* Translated items in whtracker>create signature remain translated when
posted
* No date/time localisation for Fleet/Structure timers

* Added time locale

Added date/time locale to
*Structure Timers
*Fleet Timers
*Fleet timer form datetimepicker.js

Fixed a bug where the bootstrap label didn't show up when making a
structure timer using the translated form

Missed some base.html translations

* Small translation error

Some obscure SRP strings went unnoticed for context review

* FAT & Fleet-up German Translations

+ a fix in settings.py.example

The only small thing not done is German Date/Time locale for Fleet-up

* Compiled de/django.po
2016-06-16 22:54:04 +00:00
Adarnof
e0693e7ca8 use 404 to test user not on server 2016-06-15 21:42:26 -04:00
Adarnof
b548d8a87a initialize logger 2016-06-14 10:02:31 -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
8cbfa954fa catch IndexError when getting fitting doctrine #
addresses #462
2016-06-13 10:04:57 -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
Meletis Flevarakis
e6b08fca88 XenForo integration initial version (#459)
* XenForo integration beta

* Removing debug loggers
2016-06-11 21:22:58 +00:00
Adarnof
842080f3de log warnings on failed connection to fleetup 2016-06-10 22:35:02 -04:00