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.
This commit is contained in:
parent
b31831d535
commit
9b4d5c5b4e
|
@ -19,22 +19,6 @@ Store = DS.Store.extend
|
||||||
|
|
||||||
canHandleEvent: (event, data) ->
|
canHandleEvent: (event, data) ->
|
||||||
[name, type] = event.split(':')
|
[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')
|
for name, callback of @get('pusherEventHandlerGuards')
|
||||||
unless callback(event, data)
|
unless callback(event, data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user