':param app: app name
:param user: User object
:return: DefaultConfiguration for user, or first group found, or default for app, or None'

def get_configuration_for_user(self, app, user):

    try:
        return super(DefaultConfigurationManager, self).get(app=app, user=user)
    except DefaultConfiguration.DoesNotExist:
        pass
    configs = super(DefaultConfigurationManager, self).get_queryset().filter(app=app, groups__in=user.groups.all())
    if (configs.count() > 0):
        return configs[0]
    try:
        return super(DefaultConfigurationManager, self).get(app=app, is_default=True)
    except DefaultConfiguration.DoesNotExist:
        pass
    return None
