Tpac: only show opac_visible notification opt-in settings
authorBill Erickson <berick@esilibrary.com>
Tue, 30 Aug 2011 16:54:48 +0000 (12:54 -0400)
committerBill Erickson <berick@esilibrary.com>
Tue, 30 Aug 2011 16:55:10 +0000 (12:55 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index 344696a..e32cd93 100644 (file)
@@ -163,6 +163,9 @@ sub fetch_optin_prefs {
         'open-ils.actor.event_def.opt_in.settings.atomic',
         $e->authtoken, $e->requestor->home_ou);
 
+    # some opt-ins are staff-only
+    $opt_ins = [ grep { $U->is_true($_->opac_visible) } @$opt_ins ];
+
     # fetch user setting values for each of the opt-in settings
     my $user_set = $U->simplereq(
         'open-ils.actor',