mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 15:00:16 +02:00
Correct permission check for showing APIs
This commit is contained in:
parent
5a9418d792
commit
5f88e7e1a5
@ -87,7 +87,7 @@ class CorpStats(models.Model):
|
||||
auth = AuthServicesInfo.objects.get_or_create(user=user)[0]
|
||||
if auth.main_char_id:
|
||||
try:
|
||||
char = EveCharacter.objects.get(id=auth.main_char_id)
|
||||
char = EveCharacter.objects.get(character_id=auth.main_char_id)
|
||||
if char.corporation_id == self.corp.corporation_id and user.has_perm('corputils.corp_apis'):
|
||||
return True
|
||||
if self.corp.alliance and char.alliance_id == self.corp.alliance.alliance_id and user.has_perm('corputils.alliance_apis'):
|
||||
|
@ -14,9 +14,9 @@
|
||||
{% endif %}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">{{ corpstats.corp.corporation_name }}</td>
|
||||
<td class="text-center"><h4>{{ corpstats.corp.corporation_name }}</h4></td>
|
||||
{% if corpstats.corp.alliance %}
|
||||
<td class="text-center">{{ corpstats.corp.alliance.alliance_name }}</td>
|
||||
<td class="text-center"><h4>{{ corpstats.corp.alliance.alliance_name }}</h4></td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</table>
|
||||
|
Loading…
x
Reference in New Issue
Block a user