267 Commits

Author SHA1 Message Date
Adarnof
6677e63e08 Correct resetting of permission key.
Thanks @Alf-Life
2018-05-11 10:55:56 -04:00
colcrunch
5006246cf1 Build TS perm key using State Information (#1044)
Build permkey with state group id
Pass user object to add_user instead of just username

Fixes #1043
2018-05-09 20:39:14 -04:00
Adarnof
86f57ccd56 Allow reversing service migrations.
This is probably the wrong way as we should really take care of removing the permission we added, but I don't see a reason anyone would need to migrate back that far as auth wouldn't work anymore without XML api (and even so newer installs don't have the settings referenced so permissions are not automagically added by the migration). So noop is bad but acceptable to me.

Thanks @mmolitor87
2018-05-08 10:06:58 -04:00
randomic
b4d33e5dfc Fix retry logic being suppressed by try block (#1035) 2018-04-24 11:53:13 -04:00
Adarnof
e47c04a0b0 Deactivate services when user loses main character.
This will prevent issues with service username formatting when access permissions are granted to the guest state. While users without mains cannot activate a service they could still retain an active account and it's possible to schedule a nickname update task which would subsequently error out.

Also it seems like a security issue if someone has a service account but their EVE character isn't known. cc8a7a18d23e9beb6e0a498a314e4c3bcae3f700 prevented accessing the services page without a main, now this ensures users don't have an account to manage.
2018-04-20 13:28:41 -04:00
Adarnof
08f89d2844 Stop using task_self in bound tasks. 2018-04-17 16:21:43 -04:00
Adarnof
f3f156bf57 Use Django's cache framework for task keys.
Remove depreciated only_one decorator.

Prevent including task_self repr in key name.

Because some tasks are nested in a class, they use a task_self argument instead of the normal self which the celery_once package doesn't recognize to strip out.
2018-04-17 16:21:54 -04:00
Adarnof
73e6f576f4 Use celery_once to prevent repeat task queueing.
Prevent group updates from being queued multiple times per user.

Default graceful to prevent raising exceptions.
2018-04-17 16:21:43 -04:00
Adarnof
20236cab8a Use alliance ticker stored in character table. 2018-04-17 16:18:16 -04:00
Adarnof
df3acccc50 Correct matching start of URL patterns.
Thanks @Peggle2k
2018-04-14 14:12:39 -04:00
Adarnof
933c12b48d
Increase telnet timeout
Should help tolerate slower responses from remote servers.

Closes #751

Thanks @namenmalkav
2018-04-09 22:14:21 -04:00
Adarnof
8a73890646 Ensure ticker is fetched if alliance_or_corp used.
Closes #1011
2018-04-09 21:53:41 -04:00
randomic
4eb6b73903 Nameformat configs which default to corp where alliance is None (#1003)
Add nameconfig format for alliance_or_corp_ticker
Add nameconfig format for alliance_or_corp_name
Update docs for new nameformats

Correct missing dict key if no alliance.
2018-04-03 19:25:47 -04:00
Adarnof
8266661855 Sanitize username on Discord user join.
Thanks @iakopo
2018-04-02 20:38:12 -04:00
Adarnof
bdb3ab366f Group list API endpoint has moved.
Allow infinite group cache age.

Thanks @TargetZ3R0
2018-03-22 17:59:24 -04:00
Adarnof
ad79b4f77c Correct logging string formatting. 2018-03-20 15:51:37 -04:00
Adarnof
21e896642a Stop using the patch method for setting roles.
Switch to dedicated add/remove endpoints.
Allow setting max cache age to None for infinite.

Apparently patch has issues.

Thanks @TargetZ3R0 and Discord devs <3
2018-03-19 18:08:24 -04:00
Adarnof
2fa1d9998d Handle custom table prefixes on service databases.
Closes #987

Thanks @Ric878
2018-02-28 10:56:30 -05:00
Adarnof
cc8a7a18d2 Hook URLs require logged in user with a main character.
Should prevent anything else like #983

Heavily inspired by https://gist.github.com/garrypolley/3762045#gistcomment-2089316
2018-02-26 22:50:58 -05:00
Adarnof
54f91a5bfb Simplify admin inline titles.
More descriptive name format config admin list.
2018-02-23 20:25:59 -05:00
Adarnof
814b2da0ca Redirect all signals from admin proxy models. 2018-02-23 14:44:12 -05:00
Adarnof
67cd0cd55c Reassess user groups on state change. 2018-02-23 01:50:03 -05:00
Adarnof
9e53d8b429 Correct migration dependency.
I have no idea what 0016 is, but I'm nuking my dev env to be safe.
2018-02-23 01:26:59 -05:00
Adarnof
f5abf82b95 Allow mapping of states to Teamspeak3 groups.
Addresses #950

Happy now, @colcrunch ?
2018-02-23 01:22:51 -05:00
Adarnof
d0aa46db08 Accept any ordering of groups in test.
I have no idea why the order is reversing itself. Doesn't matter for functionality which of them comes first. This just checks they're both in there and a comma to separate them.
2018-02-22 18:10:24 -05:00
Adarnof
f0ff70566b Include expected state group in test. 2018-02-22 18:01:14 -05:00
Adarnof
980569de68 Do not attempt to serialize User models 2018-02-22 17:54:35 -05:00
Adarnof
70c2a4a6e4 Use new endpoint for adding Discord users.
Closes #974
2018-02-22 17:41:38 -05:00
Adarnof
99b136b824 Delete Discord users if they've left the server.
Closes #968
2018-02-22 15:37:29 -05:00
Adarnof
ae4116c0f6 Create new role with desired attributes in one call. 2018-02-22 15:22:35 -05:00
Adarnof
3080d7d868 Prevent new roles from being sorted separately.
Addresses #969
2018-02-22 14:43:59 -05:00
Adarnof
08cf8ae1d6 Capture permission changes from proxy model on admin 2018-02-22 14:28:23 -05:00
Adarnof
3ed0f873f3 Capture signals sent by admin proxy models.
This will prevent those weird missing UserProfile and AuthGroup errors.
Add logging to authentication signals.
Correct reverse migration authservicesinfo creation.
Rename proxy models so they look better on the admin site.
2018-02-22 14:25:43 -05:00
Adarnof
a90a52f426 Ensure api backoff returns result of decorated function
(cherry picked from commit 91ec924acc7d9add3d751a0769193a6375678228)
2018-02-22 02:10:27 -05:00
Adarnof
a64dda2a2e Handle HTTP429 on nickname API endpoint
Closes #971
2018-02-21 17:47:20 -05:00
colcrunch
8ce8789631 Discord Sanitization Removal (#947)
No need to sanitize, just prune.
2018-02-21 17:40:41 -05:00
Adarnof
4d194457d8 Include state in service group sync.
The "empty" group will never appear as all users have a state so it has been removed.

I haven't yet found a good way to apply this to Teamspeak - perhaps go back to the token generation logic and create one with a user's state instead of "Member" and exempt those names from group sync?

Addresses #950
2018-02-21 17:11:22 -05:00
Adarnof
397ca97f0f Add missing context to teamspeak join template.
Closes #967
2018-02-13 18:07:34 -05:00
Adarnof
a4003e188e
Correct string formatting format
Thanks @warlof
2018-02-12 18:53:23 -05:00
Adarnof
f4a9ba2db8 Remove reference to deleted function. 2018-02-09 01:16:27 -05:00
Basraah
ac5a0d9dcb
Remove obsolete function call 2018-02-04 19:15:10 +10:00
Basraah
7ae6c66beb Fix registration of services signals 2018-01-06 12:08:53 +10:00
Basraah
be90fb96ea Remove unnecessary param 2017-12-28 10:18:50 +10:00
Basraah
dd3350b169 Fix field name 2017-12-28 09:20:11 +10:00
Basraah
f037d7fea6 Change celery tasks to shared task decorator 2017-12-11 00:26:07 +10:00
Basraah
c82d9c7722 Fix migration issue 2017-12-04 13:21:29 +10:00
Adarnof
995a44de0a Case-insensitive group name to ID translation
Seems Discourse won't let you create `Group` if `group` already exists (`422 Name has already been taken`).

Thanks @huberfe
2017-11-17 18:13:18 -05:00
Adarnof
cd0afeca15 Disable SeAT accounts instead of deleting. (#915)
See eveseat/web@1abb402
2017-11-03 19:29:39 -04:00
Basraah
86362bb0dd Refactor mumble service (#914)
* Added in_organisation check to EveCharacter model

* Basic name formatter

* Switch mumble service to use name formatter

* Squash services migrations

* Add name to example service to allow it to be used in tests

* Add name formatter to services

* Add abstract views, model, form for services modules

* Refactor mumble service to new style

* Don't set credentials if setting a provided password

* Add success message to set password view
2017-11-03 16:52:45 -04:00
Basraah
47b5b286d8 Uniform page titles 2017-10-12 10:20:40 +10:00