127 Commits

Author SHA1 Message Date
ErikKalkoken
1887bdb90a add fix and unittest for issue #1165 2019-09-08 23:09:20 +02:00
Basraah
dec793bfac Merge branch 'dependencies' into 'master'
Depencies fix

Closes #1150

See merge request allianceauth/allianceauth!1127
2019-03-12 20:50:00 +10:00
Basraah
e9ed917888 Merge branch 'fix_discourse_usernames' into 'master'
Send usernames as string instead of array

Closes #1149

See merge request allianceauth/allianceauth!1123
2019-03-12 10:00:52 +00:00
Stephen Shirley
1b192a184f Send usernames as string instead of array
Fixes https://gitlab.com/allianceauth/allianceauth/issues/1149
2019-02-09 11:10:34 +01:00
Erno Kuvaja
0edf896b4c Precent encode mumble username for connect link
This change wraps mumble username on connect link forming with
urllib.parse.quote() to ensure that the username does not contain
unsafe reserved characters and gets passed properly to mumble.

Fixes Issue: #1146
2019-01-21 14:12:50 +00:00
Basraah
49ede92e06 Skip Teamspeak server admin groups and template groups
See merge request allianceauth/allianceauth!1093
2018-08-05 01:34:34 +00:00
Loïc LEUILLIOT
14065b3ca9 Fix discourse group sync 2018-08-04 00:06:30 +00:00
Jamie McMillan
a0bab07e2f
Fix indentation 2018-06-26 10:25:29 +01:00
randomic
149bbd92ca Skip server admin groups and template groups 2018-06-26 00:03:02 +01:00
Stephen Shirley
490ce286ff Add missing <tr> tags for discourse service template 2018-05-26 13:21:39 -04:00
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