# Path: dashboard/models/alert.py
# class Feedback(object):
# class Alert(object):
# class Rules(object):
# class FakeAlert(object):
#     def __init__(self, alert_dict, alert_action):
#     def connect_sns(self):
#     def connect_ssm(self):
#     def get_sns_arn(self):
#     def _construct_alert(self):
#     def send(self):
#     def __init__(self):
#     def has_actions(self, alert_dict):
#     def has_escalation(self, alert_dict):
#     def connect_dynamodb(self):
#     def find_or_create_by(self, alert_dict, user_id):
#     def create(self, alert_dict):
#     def destroy(self, alert_id, user_id):
#     def update(self, alert_id, alert_dict):
#     def find(self, user_id):
#     def _alert_is_expired(self, alert):
#     def to_summary(self, alert_dict):
#     def find_by_id(self, alert_id):
#     def _create_alert_id(self):
#     def __init__(self, userinfo, request):
#     def run(self):
#     def alert_firefox_out_of_date(self):
#     def _firefox_info(self):
#     def _user_firefox_version(self):
#     def _version_to_dictionary(self, version_number):
#     def _firefox_out_of_date(self):
#     def __init__(self, user_id):
#     def create_fake_alerts(self):
#     def _create_fake_browser_alert(self):
#     def _create_fake_geolocation_alert(self):


import logging
import time
from faker import Faker
from dashboard.models import alert
        else:
            # This could mean a user is authing with non-ldap
            return []

    @property
    def first_name(self):
        """Return user first_name."""
        try:
            return self.idvault_info.get("firstName", "")
        except KeyError:
            return ""
        except AttributeError:
            return ""

    @property
    def last_name(self):
        """Return user last_name."""
        try:
            return self.idvault_info.get("lastName", "")
        except KeyError:
            return ""
        except AttributeError:
            return ""

    def user_identifiers(self):
        """Construct a list of potential user identifiers to match on."""
        return [self.email(), self.userinfo["sub"]]

    @property
    def alerts(self):

# Path: dashboard/models/alert.py
# class Feedback(object):
# class Alert(object):
# class Rules(object):
# class FakeAlert(object):
#     def __init__(self, alert_dict, alert_action):
#     def connect_sns(self):
#     def connect_ssm(self):
#     def get_sns_arn(self):
#     def _construct_alert(self):
#     def send(self):
#     def __init__(self):
#     def has_actions(self, alert_dict):
#     def has_escalation(self, alert_dict):
#     def connect_dynamodb(self):
#     def find_or_create_by(self, alert_dict, user_id):
#     def create(self, alert_dict):
#     def destroy(self, alert_id, user_id):
#     def update(self, alert_id, alert_dict):
#     def find(self, user_id):
#     def _alert_is_expired(self, alert):
#     def to_summary(self, alert_dict):
#     def find_by_id(self, alert_id):
#     def _create_alert_id(self):
#     def __init__(self, userinfo, request):
#     def run(self):
#     def alert_firefox_out_of_date(self):
#     def _firefox_info(self):
#     def _user_firefox_version(self):
#     def _version_to_dictionary(self, version_number):
#     def _firefox_out_of_date(self):
#     def __init__(self, user_id):
#     def create_fake_alerts(self):
#     def _create_fake_browser_alert(self):
#     def _create_fake_geolocation_alert(self):


# Path: dashboard/models/user.py
import logging
import time
from faker import Faker
from dashboard.models import alert

        else:
            # This could mean a user is authing with non-ldap
            return []

    @property
    def first_name(self):
        """Return user first_name."""
        try:
            return self.idvault_info.get("firstName", "")
        except KeyError:
            return ""
        except AttributeError:
            return ""

    @property
    def last_name(self):
        """Return user last_name."""
        try:
            return self.idvault_info.get("lastName", "")
        except KeyError:
            return ""
        except AttributeError:
            return ""

    def user_identifiers(self):
        """Construct a list of potential user identifiers to match on."""
        return [self.email(), self.userinfo["sub"]]

    @property
    def alerts(self):

        alerts = alert.Alert().find(user_id=self.userinfo["sub"])