From 9b4d5c5b4ee60387a730a94f4d5c236bc5cf7a18 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Mon, 30 Nov 2015 09:51:34 +0100 Subject: [PATCH] Remove obsolete pusher handling code from store Removed code was checking if we should handle a pusher event, ie. if the event is associated with the user, or if we already have a record associated with the event. We don't need the check now, because we no longer use the common channel. --- app/services/store.coffee | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/services/store.coffee b/app/services/store.coffee index 3b83016c..4aa3fff3 100644 --- a/app/services/store.coffee +++ b/app/services/store.coffee @@ -19,22 +19,6 @@ Store = DS.Store.extend canHandleEvent: (event, data) -> [name, type] = event.split(':') - auth = @get('auth') - - if event != 'job:log' && auth.get('signedIn') && - !config.pro && !config.enterprise - # if recent repos hasn't been opened yet, we can safely - # drop any events that doesn't belong to repos owned by - # the logged in user and that aren't related to any - # repositories that are already opened - - permissions = auth.get('permissions') - if name == 'job' - id = data.job.repository_id - else if name == 'build' - id = data.repository.id - - return @hasRecordForId('repo', id) || permissions.contains(id) for name, callback of @get('pusherEventHandlerGuards') unless callback(event, data)