Compare commits

...

15 Commits

Author SHA1 Message Date
Basraah
aecc94bdb3 Version bump to v2.2.1 2019-08-25 03:20:45 +00:00
Basraah
fcb7f2905a Merge branch 'url_group' into 'master'
urlize group descriptions to hyperlink if required

See merge request allianceauth/allianceauth!1132
2019-08-24 22:48:57 +00:00
Basraah
34c7169ca3 Merge branch 'local_settings_update' into 'master'
Enable utf8mb4 charset option in local.py by default

See merge request allianceauth/allianceauth!1131
2019-08-24 22:47:25 +00:00
Basraah
6e450061f4 Merge branch 'group-rework' into 'master'
Make group joins a bit clearer

See merge request allianceauth/allianceauth!1134
2019-08-24 22:46:46 +00:00
Basraah
fc3d7e9f43 Merge branch 'auto-group' into 'master'
Fix Autogroups, Add Autogroups to admin

Closes #1087

See merge request allianceauth/allianceauth!1133
2019-08-24 22:45:25 +00:00
Aaron Kable
514db4f9a2 Make group joins a bit clearer 2019-08-23 03:54:24 -04:00
Aaron Kable
23a8b65ce2 Fix Autogroups, Add Autogroups to admin 2019-08-22 20:37:55 -04:00
Aaron Kable
f8e6662bc8 urlize group descriptions to hyperlink if required 2019-07-26 00:35:59 -04:00
Col Crunch
89be2456fb Update local.py to have the utf8mb4 charset option enabled in the database settings. This brings the settings inline with the documentation update. 2019-06-30 22:58:13 -04:00
Basraah
bfd3451717 Merge branch 'db_doc' into 'master'
Use utf8mb4 When Creating Auth DB

See merge request allianceauth/allianceauth!1130
2019-06-20 00:49:30 +00:00
Col Crunch
0b759d6a32 Use utf8mb4 when creating auth db rather than utf8 2019-06-19 16:27:18 -04:00
Basraah
65e05084e6 Merge branch 'master' into 'master'
Show "Help" link only to superuser

See merge request allianceauth/allianceauth!1129
2019-06-17 00:56:28 +00:00
Peter Pfeufer
f25a4ed386 Show "Help" lnk only to superuser 2019-06-15 23:44:36 +02:00
Basraah
b2a1d41829 Merge branch 'patch-1' into 'master'
Add Ariel Rin and Col Crunch as developers to readme

See merge request allianceauth/allianceauth!1128
2019-05-29 09:21:51 +00:00
Ariel Rin
3570ce86d7 Add Ariel Rin and Col Crunch as developers to readme 2019-03-17 05:39:43 +00:00
8 changed files with 31 additions and 17 deletions

View File

@@ -19,6 +19,8 @@ Active Developers:
- [Adarnof](https://gitlab.com/adarnof/) - [Adarnof](https://gitlab.com/adarnof/)
- [Basraah](https://gitlab.com/basraah/) - [Basraah](https://gitlab.com/basraah/)
- [Ariel Rin](https://gitlab.com/soratidus999/)
- [Col Crunch](https://gitlab.com/colcrunch/)
Beta Testers / Bug Fixers: Beta Testers / Bug Fixers:

View File

@@ -1,6 +1,6 @@
# This will make sure the app is always imported when # This will make sure the app is always imported when
# Django starts so that shared_task will use this app. # Django starts so that shared_task will use this app.
__version__ = '2.2.0' __version__ = '2.2.1'
NAME = 'Alliance Auth v%s' % __version__ NAME = 'Alliance Auth v%s' % __version__
default_app_config = 'allianceauth.apps.AllianceAuthConfig' default_app_config = 'allianceauth.apps.AllianceAuthConfig'

View File

@@ -1,6 +1,6 @@
from django.contrib import admin from django.contrib import admin
from django.db import models from django.db import models
from .models import AutogroupsConfig from .models import AutogroupsConfig, ManagedCorpGroup, ManagedAllianceGroup
import logging import logging
@@ -37,3 +37,6 @@ class AutogroupsConfigAdmin(admin.ModelAdmin):
admin.site.register(AutogroupsConfig, AutogroupsConfigAdmin) admin.site.register(AutogroupsConfig, AutogroupsConfigAdmin)
admin.site.register(ManagedCorpGroup)
admin.site.register(ManagedAllianceGroup)

View File

@@ -179,15 +179,13 @@ class AutogroupsConfig(models.Model):
@transaction.atomic @transaction.atomic
def create_alliance_group(self, alliance: EveAllianceInfo) -> Group: def create_alliance_group(self, alliance: EveAllianceInfo) -> Group:
group, created = Group.objects.get_or_create(name=self.get_alliance_group_name(alliance)) group, created = Group.objects.get_or_create(name=self.get_alliance_group_name(alliance))
if created: ManagedAllianceGroup.objects.get_or_create(group=group, config=self, alliance=alliance)
ManagedAllianceGroup.objects.create(group=group, config=self, alliance=alliance)
return group return group
@transaction.atomic @transaction.atomic
def create_corp_group(self, corp: EveCorporationInfo) -> Group: def create_corp_group(self, corp: EveCorporationInfo) -> Group:
group, created = Group.objects.get_or_create(name=self.get_corp_group_name(corp)) group, created = Group.objects.get_or_create(name=self.get_corp_group_name(corp))
if created: ManagedCorpGroup.objects.get_or_create(group=group, config=self, corp=corp)
ManagedCorpGroup.objects.create(group=group, config=self, corp=corp)
return group return group
def delete_alliance_managed_groups(self): def delete_alliance_managed_groups(self):
@@ -240,6 +238,8 @@ class ManagedGroup(models.Model):
class Meta: class Meta:
abstract = True abstract = True
def __str__(self):
return "Managed Group: %s" % self.group.name
class ManagedCorpGroup(ManagedGroup): class ManagedCorpGroup(ManagedGroup):
corp = models.ForeignKey(EveCorporationInfo, on_delete=models.CASCADE) corp = models.ForeignKey(EveCorporationInfo, on_delete=models.CASCADE)

View File

@@ -19,7 +19,7 @@ url
{% for g in groups %} {% for g in groups %}
<tr> <tr>
<td class="text-center">{{ g.group.name }}</td> <td class="text-center">{{ g.group.name }}</td>
<td class="text-center">{{ g.group.authgroup.description }}</td> <td class="text-center">{{ g.group.authgroup.description|urlize }}</td>
<td class="text-center"> <td class="text-center">
{% if g.group in user.groups.all %} {% if g.group in user.groups.all %}
{% if not g.request %} {% if not g.request %}
@@ -32,9 +32,15 @@ url
</button> </button>
{% endif %} {% endif %}
{% elif not g.request %} {% elif not g.request %}
<a href="{% url 'groupmanagement:request_add' g.group.id %}" class="btn btn-success"> {% if g.group.authgroup.open %}
{% trans "Request" %} <a href="{% url 'groupmanagement:request_add' g.group.id %}" class="btn btn-success">
</a> {% trans "Join" %}
</a>
{% else %}
<a href="{% url 'groupmanagement:request_add' g.group.id %}" class="btn btn-primary">
{% trans "Request" %}
</a>
{% endif %}
{% else %} {% else %}
<button type="button" class="btn btn-primary" disabled> <button type="button" class="btn btn-primary" disabled>
{{ g.request.status }} {{ g.request.status }}

View File

@@ -30,6 +30,7 @@ DATABASES['default'] = {
'PASSWORD': '', 'PASSWORD': '',
'HOST': '127.0.0.1', 'HOST': '127.0.0.1',
'PORT': '3306', 'PORT': '3306',
'OPTIONS': {'charset': 'utf8mb4'},
} }
# Register an application at https://developers.eveonline.com for Authentication # Register an application at https://developers.eveonline.com for Authentication

View File

@@ -27,12 +27,14 @@
{% menu_items %} {% menu_items %}
<li> {% if user.is_superuser %}
<a class="{% navactive request 'authentication:help' %}" <li>
href="{% url 'authentication:help' %}"> <a class="{% navactive request 'authentication:help' %}"
<i class="fa fa-question fa-fw"></i> {% trans "Help" %} href="{% url 'authentication:help' %}">
</a> <i class="fa fa-question fa-fw"></i> {% trans "Help" %}
</li> </a>
</li>
{% endif %}
</ul> </ul>
</div> </div>
</div> </div>

View File

@@ -71,7 +71,7 @@ CentOS:
Alliance Auth needs a MySQL user account and database. Open an SQL shell with `mysql -u root -p` and create them as follows, replacing `PASSWORD` with an actual secure password: Alliance Auth needs a MySQL user account and database. Open an SQL shell with `mysql -u root -p` and create them as follows, replacing `PASSWORD` with an actual secure password:
CREATE USER 'allianceserver'@'localhost' IDENTIFIED BY 'PASSWORD'; CREATE USER 'allianceserver'@'localhost' IDENTIFIED BY 'PASSWORD';
CREATE DATABASE alliance_auth CHARACTER SET utf8; CREATE DATABASE alliance_auth CHARACTER SET utf8mb4;
GRANT ALL PRIVILEGES ON alliance_auth . * TO 'allianceserver'@'localhost'; GRANT ALL PRIVILEGES ON alliance_auth . * TO 'allianceserver'@'localhost';
Add timezone tables to your mysql installation: Add timezone tables to your mysql installation: