Allow apps to be processed even when apps are disabled for the corp

This commit is contained in:
2011-03-18 15:13:16 +00:00
parent 9c99a18e57
commit 4e37d97db0

View File

@@ -37,7 +37,7 @@ def send_message(application, message_type, note=None):
def check_permissions(user, application=None):
""" Check if the user has permissions to view or admin the application """
corplist = EVEPlayerCharacter.objects.filter(eveaccount__user=user,corporation__applications=True)
corplist = EVEPlayerCharacter.objects.select_related('roles').filter(eveaccount__user=user)
if not application:
if user.has_perm('hr.can_view_all') or user.has_perm('hr.can_view_corp') or corplist.filter(roles__name='roleDirector').count():
return HR_ADMIN