121 Commits

Author SHA1 Message Date
Basraah
53d7916772 Move context processor 2017-09-23 11:32:32 +10:00
Basraah
76ab835347 Add base app, remove explicit template loading 2017-09-20 07:42:47 +10:00
Mike
889fcfd0e0 settings.py.example fixes 2017-09-19 05:00:05 -04:00
Basraah
18f64b0357 Remove IPBoard3 support (#868) 2017-09-19 11:35:35 +10:00
Basraah
786859294d Restructure Alliance Auth package (#867)
* Refactor allianceauth into its own package

* Add setup

* Add missing default_app_config declarations

* Fix timerboard namespacing

* Remove obsolete future imports

* Remove py2 mock support

* Remove six

* Add experimental 3.7 support and multiple Dj versions

* Remove python_2_unicode_compatible

* Add navhelper as local package

* Update requirements
2017-09-19 09:46:40 +10:00
Adarnof
5ce5f37867 Periodic checks of character ownership hashes.
Fix migration naming from merge.
2017-09-17 02:31:46 -04:00
Adarnof
02f2968ee5 Merge branch 'master' of https://github.com/Adarnof/allianceauth into sso_registration
# Conflicts:
#	alliance_auth/__init__.py
#	corputils/models.py
#	corputils/views.py
#	eveonline/tasks.py
#	fleetactivitytracking/views.py
#	hrapplications/admin.py
#	requirements.txt
2017-09-17 01:36:05 -04:00
Adarnof
8987cf2199 Use Django's cache framework for service group names (#857)
Use django-redis-cache backend for locking get_or_set
No longer require group-related tasks to be locked to one simultaneous execution.
Remove legacy service group cache models.

Truncate Discord nicknames to 32 characters
Correct Discourse group name extension using only valid leading characters.
Prevent name slicing from ending with illegal character

Closes #801
Closes #847
Closes #835
Closes #852
2017-09-11 20:42:13 -04:00
Basraah
27c9b09116 Add encoding declaration to prevent #819 2017-09-11 12:59:13 +10:00
Adarnof
23bfc3d34a Correct main character reset on token invalidation.
Correct interpretation of missing SERVICES_MIGRATED setting.
Remove legacy api sync celerybeat scheduled task.
2017-06-13 20:34:39 -04:00
Adarnof
7ab88dd663 Alter task to update all eveonline models 2017-06-12 22:20:42 -04:00
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
Adarnof
ccc7412947 Update test settings 2017-05-27 17:02:59 -04:00
Basraah
17dd7c04c7 Replace django-celery with base Celery (#791)
Update celery tasks to new style & remove djcelery
Vanilla celery + django-celery-beat take over the role of djcelery. Task schedules are consolidated into settings instead of residing in code.
Update docs and example supervisor configs.
2017-05-03 16:53:16 -04:00
Adarnof
87973951b8 Correct translation issues.
Correct py3 str model methods.
2017-04-07 00:23:25 -04:00
Adarnof
96b04a269d Merge master.
Fix FAT statistics generation.
2017-04-07 00:21:14 -04:00
Adarnof
6f36a26694 Allow ordering of ApplicationForm questions
Closes #775
2017-03-26 23:31:56 -04:00
Adarnof
13b0dbc960 Restructure settings.py.example
Add help text to State model
Remove navbar group headings
Fix registration email pluralization
Group memberships on state admin page
Attempt to prevent resetting of state if set on profile admin manually
Embed readthedocs on help page
Rename CorpStats API Index to Registration Index
Default corputils view to main character's corp if available
Correct Application characters listing
Correct string coercion of optimers
Improve readability of SRP values with intcomma
Beautify tables by embeding in panels
Replace slugify with py3-friendly python-slugify
2017-03-25 16:28:26 -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
Adarnof
9897c0bbba Provide mumble quick join link
Add button titles to services
2017-03-08 17:31:41 -05:00
Nathan Morgan
e6e1339d71 Added Google reCaptcha (#738) 2017-02-28 11:27:24 +10:00
Basraah
ed52f4f411 Change default database usernames
Makes the source of SQL error messages more clear
2017-02-23 11:08:16 +10:00
Basraah
3af1a6a1fb Correct scheduled task calls 2017-02-13 13:45:50 +10:00
Basraah
a33c8c14ee Grant service access by permissions (#692)
* Add service access permissions and migration

`ENABLE_AUTH_<servicename> = True` will have the new permission applied
to the settings configured `DEFAULT_AUTH_GROUP` group or `Member` if
none is configured.

`ENABLE_BLUE_<servicename> = True` will have the new permission applied
to the settings configured `DEFAULT_BLUE_GROUP` group or `Blue` if none
is configured.

* Move views and hooks to permissions based access

* Remove access restriction to services view

Hypothetically non-member/blues could be granted permission to access
services manually as desired now. A user that has no permissions to
access any services will see a blank services list.

* Remove obsolete service settings

* Remove references to obsolete settings

* Adjusted tests to support permissions based access

* Fix incorrectly named permissions

* Add simple get_services generator function

* Added signals for user and groups perm changes

* Update validate_services to support permissions

deactivate_services removed as its surplus to requirements.

* Removed state parameter from validate_services calls

* Update tests to support signals changes

* Fix incorrect call to validate_services task

* Fix validate_services and test

* Add validate_user to changed user groups signal

* Added tests for new signals

* Remove unnecessary post_add signals

* Added documentation for service permissions

* Added detection for members with service active

If there are any service users in the Member or Blue groups active, then
the permission will be added to the respective Member or Blue group.
This means its no longer necessary to maintain the service enablesettings to migrate to permissions based service.

Remove obsolete state based status checking
2017-02-11 22:51:30 -05:00
Adarnof
8c82897a92 Support static blue corps and alliances (#708) 2017-02-11 22:05:32 -05:00
Basraah
914c204a40 SeAT Manager (#704)
* SeAT service in modular service app format

* Replace string concatenation with formatters

* Fix incorrect references to user

* Fix exception when user doesn't have seat active

* Prevent deletion of seat API keys by default

* Improve api response error handling

* Corrected notification message

* Added missing view returns

* Update SeAT to use permissions based access

* Update password generator to new style

* Correct logging message

* Fix seat role update tasks

* Correct validate user logic

* Add seat test settings

* Added basic seat unit tests

* Added add permissions function from other branch

* Remove obsolete settings references
2017-02-11 22:04:47 -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
aa0148f23b Services Modules migration improvements (#676)
* Added a check to prevent dataloss from missing service modules

Migration will raise an exception and refuse to run if a model has data
for a field which is missing its target service.

* Add setting to allow services to be installed after service migration

Previously django would complain about migrations being out of order. By
setting `SERVICES_MIGRATED=True` the
`authentication.0013_service_modules` migration drops all of its
'optional' dependencies which allows the initial migrations of service
modules to run normally. If the setting is missing or set to False, the
migration will require all installed and required services migrations to
have run before the `authentication.0013_service_modules` migration.

* Move setting to somewhere it makes more sense

* Modify celerybeat registration to automatically register services
2017-01-28 18:15:58 +10:00
Basraah
35ceb53936 Fix some incorrect service example URLs 2017-01-28 08:53:49 +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
0292ad07ad Customizable API auditing URLs via template filter (#652)
Closes #636
2017-01-19 23:01:26 -05:00
Adarnof
0b57e027f7 Variable itemtype name datasources (#662)
Make provider settings optional
Wait to initialize adapter until first external call
Abstract get methods from adapter
2017-01-19 19:19:20 -05:00
Adarnof
55cbbadc2b Cache EVE API objects using django-redis to speed repeated queries. (#638) 2017-01-13 20:56:41 -05:00
Adarnof
2f5529b582 Remove refernces to optional SSO configuration 2016-12-29 18:34:21 -05:00
Adarnof
04f2731517 Multitenant
Closes #604
2016-12-29 18:10:43 -05:00
Adarnof
71c1054328 EVE Swagger Interface
Closes #591

Conflicts:
	authentication/views.py
	eveonline/views.py
	stock/templates/public/characternotexisting.html
2016-12-29 17:53:33 -05:00
Adarnof
03aab76ab9 Group system overhaul
Closes #588
2016-12-29 17:42:10 -05:00
Adarnof
3cdbff6b36 Merge branch 'esi' of https://github.com/r4stl1n/allianceauth into multitenant 2016-12-20 06:54:40 +00:00
Adarnof
54464c23cf Begin removal of IS_CORP 2016-12-20 06:54:29 +00:00
Adarnof
ce35e72e44 Correct discourse group sync task calling. 2016-12-20 01:20:31 +00:00
Adarnof
8582584fd5 prevent redis connectionerror for async tasks 2016-12-19 17:33:11 -05:00
Adarnof
ec9b43b083 Allow different sources for EVE data types. 2016-12-17 14:46:02 -05:00
Adarnof
66240ad296 Standardize EVE datasource responses.
Remove alliance member count.
2016-12-16 22:13:29 -05:00
Adarnof
a4a8852400 Replace rabbitmq with redis
Closes #592
2016-12-14 08:28:58 -05:00
Adarnof
27fc8a373f Pull corp memebrship data from ESI 2016-12-13 16:11:06 -05:00
Adarnof
a630b5b397 Migrate to adarnauth-esi 2016-12-11 20:11:05 -05:00