81 Commits

Author SHA1 Message Date
Adarnof
97fe2ddfd0 Move templates and urls to apps.
Implement url hooks.
Many apps are now removable.
Default to assuming services have been migrated.
2017-06-07 22:49:46 -04:00
Adarnof
9cc9a36766 Merge branch 'master' of https://github.com/Adarnof/allianceauth into custom_user 2017-06-06 21:48:02 -04:00
Basraah
5db340c64a Fleet-up cleanup (#798)
Add caching and better error handling
Move fleetup templates into fleetup app
Move fleetup urls into fleetup app
Fix button overflow and url
Add manager unit tests
Fix python3 compatibility
2017-06-04 18:35:23 -04:00
Adarnof
971ce294ad Merge branch 'master' of https://github.com/Adarnof/allianceauth into custom_user
# Conflicts:
#	alliance_auth/settings.py.example
#	eveonline/views.py

Fix some tests.
2017-05-27 17:25:15 -04:00
iAddz
1b0c3c3bfc Corp member view for fat stats (#785)
Additionally fixes 500's from showing when
- a corporation object has been deleted
- an account doesn't have a main char set

Add Math tooltips
2017-05-04 10:39:03 -04:00
iAddz
4556a0e740 SRP QOL + Validation (#786)
- new UI for srp management (mass performs, inline editing)
- unique validation for srp killboard links
- character auth ownership verification for killboard links
- removed remnants of old error messaging system & replaced with current
standard
 - added a confirmation popup when deleting fleet SRP's
2017-05-03 16:55:10 -04:00
Adarnof
963cecb365 Fix registration.
Fix state assignment.
Fix character ownership transfer.
Disable non-staff passwords.
Fix dashboard groups panel placement.
Fix corpstats viewmodel retrieval.
2017-03-24 19:50:50 -04:00
Adarnof
e15d79b834 Bulk of the profile work is done. 2017-03-23 22:54:25 -04:00
iAddz
a6c48f8d71 Localisation & German translation updates (#701) 2017-02-11 23:04:18 -05:00
Basraah
b636262e0c Permissions Auditing Tool (#698)
* Added block for page_title as title fragment

* Add permissions auditing tool

* Added tests for permissions audit tool

* Added documentation for permissions tool

* Add permissions tool to coverage
2017-02-10 21:25:09 +10:00
Basraah
1066e6ac98 The Great Services Refactor (#594)
* Hooks registration, discovery and retrieval module

Will discover @hooks.register decorated functions inside
the auth_hooks module in any installed django app.

* Class to register modular service apps

* Register service modules URLs

* Example service module

* Refactor services into modules

Each service type has been split out into its own django app/module. A
hook mechanism is provided to register a subclass of the ServiceHook
class. The modules then overload functions defined in ServiceHook as
required to provide interoperability with alliance auth. Service modules
provide their own urls and views for user registration and account
management and a partial template to display on the services page. Where
possible, new modules should provide their own models for local data
storage.

* Added menu items hooks and template tags

* Added menu item hook for broadcasts

* Added str method to ServicesHook

* Added exception handling to hook iterators

* Refactor mumble migration and table name

Upgrading will require `migrate mumble --fake-initial` to be run first
and then `migrate mumble` to rename the table.

* Refactor teamspeak3 migration and rename table

Upgrading will require `migrate teamspeak3 --fake-initial`

* Added module models and migrations for refactoring AuthServicesInfo

* Migrate AuthServiceInfo fields to service modules models

* Added helper for getting a users main character

* Added new style celery instance

* Changed Discord from AuthServicesInfo to DiscordUser model

* Switch celery tasks to staticmethods

* Changed Discourse from AuthServicesInfo to DiscourseUser model

* Changed IPBoard from AuthServicesInfo to IpboardUser model

* Changed Ips4 from AuthServicesInfo to Ips4User model

Also added disable service task.

This service still needs some love though. Was always missing a
deactivate services hook (before refactoring) for reasons I'm unsure of
so I'm reluctant to add it without knowing why.

* Changed Market from AuthServicesInfo to MarketUser model

* Changed Mumble from AuthServicesInfo to MumbleUser model

Switched user foreign key to one to one relationship.
Removed implicit password change on user exists.
Combined regular and blue user creation.

* Changed Openfire from AuthServicesInfo to OpenfireUser model

* Changed SMF from AuthServicesInfo to SmfUser model

Added disable task

* Changed Phpbb3 from AuthServicesInfo to Phpbb3User model

* Changed XenForo from AuthServicesInfo to XenforoUser model

* Changed Teamspeak3 from AuthServicesInfo to Teamspeak3User model

* Remove obsolete manager functions

* Standardise URL format

This will break some callback URLs
Discord changes from /discord_callback/ to /discord/callback/

* Removed unnecessary imports

* Mirror upstream decorator change

* Setup for unit testing

* Unit tests for discord service

* Added add main character helper

* Added Discourse unit tests

* Added Ipboard unit tests

* Added Ips4 unit tests

* Fix naming of market manager, switch to use class methods

* Remove unused hook functions

* Added market service unit tests

* Added corp ticker to add main character helper

* Added mumble unit tests

* Fix url name and remove namespace

* Fix missing return and add missing URL

* Added openfire unit tests

* Added missing return

* Added phpbb3 unit tests

* Fix SmfManager naming inconsistency and switch to classmethods

* Added smf unit tests

* Remove unused functions, Added missing return

* Added xenforo unit tests

* Added missing return

* Fixed reference to old model

* Fixed error preventing groups from syncing on reset request

* Added teamspeak3 unit tests

* Added nose as test runner and some test settings

* Added package requirements for running tests

* Added unit tests for services signals and tasks

* Remove unused tests file

* Fix teamspeak3 service signals

* Added unit tests for teamspeak3 signals

Changed other unit tests setUp to inert signals

* Fix password gen and hashing python3 compatibility

Fixes #630

Adds unit tests to check the password functions run on both platforms.

* Fix unit test to not rely on checking url params

* Add Travis CI settings file

* Remove default blank values from services models

* Added dynamic user model admin actions for syncing service groups

* Remove unused search fields

* Add hook function for syncing nicknames

* Added discord hook for sync nickname

* Added user admin model menu actions for sync nickname hook

* Remove obsolete code

* Rename celery config app to avoid package name clash

* Added new style celerybeat schedule configuration

periodic_task decorator is depreciated

* Added string representations

* Added admin pages for services user models

* Removed legacy code

* Move link discord button to correct template

* Remove blank default fields from example model

* Disallow empty django setting

* Fix typos

* Added coverage configuration file

* Add coverage and coveralls to travis config

Should probably use nose's built in coverage, but this works for now.

* Replace AuthServicesInfo get_or_create instances with get

Reflects upstream changes to AuthServicesInfo behaviour.

* Update mumble user table name

* Split out mumble authenticator requirements

zeroc-ice seems to cause long build times on travis-ci and isn't
required for the core projects functionality or testing.
2017-01-25 12:50:16 +10: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
2816a5fa46 Change admin site header to version number (#611) 2017-01-02 20:24:41 -05:00
Basraah
4ae450f963 Group system overhaul (#588)
* Add open/hidden group membership display and remove

* Include requestable groups other than open

* Prevent users requesting or leaving non-joinable groups

I have not prevented users joining hidden groups however, as
there may be some use cases where the direct link is provided
for users to request access to the group.

Also prevent users generating leave requests for groups they
are not a member of.

* Refactor Group extension models into a single OneToOne model

Added group leader field

* Add blankable fields

* Switched to use navactive for menu highlighting

* Consolidate member state checking for easier code reuse

* Added support for group leaders to manage groups

* Added info log when a user removes someone from a group

* Add ordering to group member list
2017-01-02 18:52:20 -05:00
Adarnof
1e523d762e Remove references to legacy character management.
Correct group name spacing.
2016-12-29 17:41:00 -05:00
Basraah
1c4d2533b1 Replace API key management w/ ported profile page
Shows characters on each API key, main character, API key
status and the user groups.
2016-11-23 21:17:44 +10: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
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
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
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
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
Joakim Strandberg
20fdcc5b31 More statistics features for Fatlink (#423)
* Fixed a bug with links not registering correctly when undocked. Also removed some typos.

* Adding functionality to view individual members stats as an admin, to see ships flown, and paps created, if any. Also correcting a incorrectly sorted table, and a faulty link.
2016-05-05 02:18:35 -05:00
Joakim Strandberg
b190b8e191 Adding "Paplink" feature (#401)
* Initial testing of paplink functionality. More fancy interfaces coming.

* Removed a invalid view reference.

* Added a link on the front page.

* Fixed some bad references and incorrect in game browser header usages.

* Started work on statistics-pages.

* Added an initial modify-paplink page where the pap itself can be deleted and characters removed.

* Added a very simple statistics page. Also some name change for ~reasons~.

* Small but crucial fix of syntax.

* Added personal statistics page.

* Corputils page now include fatlinkstats.

* Added link to the personal statistics page. Moved other buttons for clarity.

* Removed some unused code and imports

* Added more statistics, and all corps in alliance are now visible even if no paps are registered.

* Now requesting trust for the right domain. And some redundant imports and commented lines are removed.
2016-04-29 18:00:45 -05:00
johanko
2dd531c2b7 Merge branch 'master' of https://github.com/R4stl1n/allianceauth into R4stl1n-master 2016-04-21 06:32:18 +00:00
Mr McClain
5025ab8ffe Pathfinder Integration (#394)
tested and working
2016-04-17 15:02:50 -05:00
Adarnof
e29c1d3295 Discourse (#377)
* Initial work on Discourse integration

* Views for discourse

* Discourse group updates
Correct password display

* Removed password functions
Changed delete to suspend user forever
Added unsuspend check to add_user
2016-04-17 14:17:32 -05:00
Mr McClain
6f8e478baf Evernus Alliance Market Integration (#369)
* Added SMF Forum Support

* removed comment

* Fixed bugs.

* removed unused SQL statement

* Fixed Grammer in debug code

* Fixed Null Bug

* Update operationmanagement.html

* fixed bug

* fixed error

* Users now show up on the posts correctly

* Evernus Alliance Market Integration

* removed duplicate function

* empty string handling
2016-04-07 20:46:14 -05:00
Mr McClain
cfe0e23430 SMF Forum Integration
* Added SMF Forum Support

* removed comment

* Fixed bugs.

* removed unused SQL statement

* Fixed Grammer in debug code

* Fixed Null Bug

* Update operationmanagement.html

* fixed bug

* fixed error

* Users now show up on the posts correctly
2016-04-06 20:32:02 -05:00
johanko
1770fc5548 Fleetup API manager and views 2016-04-06 13:11:15 +00:00
orbitroom
75459361dc Added IP Board 4 2016-03-30 04:04:14 -05:00
Adarnof
361e4a6409 Prompt users to join TS when creating account
- will allow groups to sync
 - add button to get back to this prompt
 - do not sync groups until joined server
Closes #331
2016-03-26 03:08:28 +00:00
orbitroom
2f5d6d4871 Added Enhancements to SRP Management 2016-03-24 18:36:46 -04:00
Adarnof
477e579eba Rewrote views to handle new models.
Everything works but comments.
2016-03-13 21:47:09 +00:00
Ydmir
a2438b2e16 Merged corpstats and membertracking. Added two new permissions, corp_apis and alliance_apis. 2016-02-26 00:15:10 +01:00
Mr McClain
80e8f9ca4d Update url schema 2016-02-24 12:06:55 -06:00
orbitroom
11b1f2fb0e Added Ability to Delete Notifications 2016-02-23 19:41:32 -05:00
Adarnof
5e2c828c3b Front-end notification system
Currently only creates notifications for logging events
Addresses #75
2016-02-13 21:53:43 +00:00
orbitroom
a3c3f002bc Added ability to edit structure timers 2016-02-11 22:03:16 -05:00
orbitroom
c19f6f5929 Added Ability to Edit Signatures 2016-02-11 19:04:11 -05:00
Mr McClain
4a08b6f67d Added missing url 2016-02-11 16:25:18 -06:00
orbitroom
1b938a536a Added ability to edit operations timers 2016-02-11 17:18:27 -05:00
Adarnof
2d2afa79eb Added ability to manually trigger api refresh
Ignored cache databases
2016-02-07 11:40:11 +00:00
Ydmir
9041f0e7c7 Handling missing settings.CORP_ID in alliance mode, and api-scope error in corporation mode. Also fixing visual on the corputilsearchview. 2016-01-31 11:29:54 +01:00
Ydmir
1e86df3992 Fixed indentation for real... 2016-01-30 11:26:42 +01:00
Joakim Strandberg
2ce48c4796 Fixed indentation. 2016-01-28 23:30:08 +01:00
Ydmir
29e5790ec7 Now the search function works in alliance mode as well, searching the corp that is currently active. Also, the select corporation is nicer now. 2016-01-25 23:19:28 +01:00
Ydmir
62efad2b66 Merged changes in master. 2016-01-24 00:27:03 +01:00
Ydmir
25b89fdecb Expanded functionality to full alliance support. The design may leave some things to wish for... 2016-01-24 00:13:58 +01:00
orbitroom
6fb70b3160 Added Fleet Operations Timer 2016-01-20 22:04:58 -05:00