[BREAK] Remove publication `roomSubscriptionsByRole` (#15193)
parent
bcef8eb910
commit
f971ce6a85
@ -1,28 +0,0 @@ |
||||
import { Meteor } from 'meteor/meteor'; |
||||
|
||||
import { hasPermission } from '../../app/authorization'; |
||||
import { Subscriptions } from '../../app/models'; |
||||
|
||||
Meteor.publish('roomSubscriptionsByRole', function(rid, role) { |
||||
console.warn('The publication "roomSubscriptionsByRole" is deprecated and will be removed after version v2.0.0'); |
||||
|
||||
if (!this.userId) { |
||||
return this.ready(); |
||||
} |
||||
|
||||
if (hasPermission(this.userId, 'view-other-user-channels') !== true) { |
||||
return this.ready(); |
||||
} |
||||
|
||||
return Subscriptions.findByRoomIdAndRoles(rid, role, { |
||||
fields: { |
||||
rid: 1, |
||||
name: 1, |
||||
roles: 1, |
||||
u: 1, |
||||
}, |
||||
sort: { |
||||
name: 1, |
||||
}, |
||||
}); |
||||
}); |
||||
Loading…
Reference in new issue