Exemple #1
0
 def setting_for_user(self, notice_type, medium_id):
     return notice_setting_for_user(
         self.request.user,
         notice_type,
         medium_id,
         scoping=self.scoping
     )
Exemple #2
0
    def for_user(cls, user, notice_type, medium, scoping=None):
        """
        Kept for backwards compatibilty but isn't used anywhere within this app

        @@@ consider deprecating
        """
        return notice_setting_for_user(user, notice_type, medium, scoping)
Exemple #3
0
 def can_send(self, user, notice_type, scoping):
     """
     Determines whether this backend is allowed to send a notification to
     the given user and notice_type.
     """
     return notice_setting_for_user(user, notice_type, self.medium_id, scoping).send
Exemple #4
0
 def setting_for_user(self, notice_type, medium_id):
     return notice_setting_for_user(self.request.user,
                                    notice_type,
                                    medium_id,
                                    scoping=self.scoping)