23 lines
546 B
JavaScript
23 lines
546 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
|
|
|
|
if (Meteor.isServer) {
|
|
Meteor.publish(null, function() {
|
|
if(this.userId) {
|
|
return Meteor.roleAssignment.find({'user._id': this.userId});
|
|
}
|
|
else {
|
|
this.ready();
|
|
}
|
|
})
|
|
|
|
// Meteor.methods({
|
|
// 'users.setupInitialRoles'() {
|
|
// Roles.createRole('admin');
|
|
// Roles.createRole('laptop-management');
|
|
// Roles.addRolesToParent('laptop-management', 'admin');
|
|
// Roles.addUsersToRoles("zwbMiaSKHix4bWQ8d", 'admin', 'global');
|
|
// }
|
|
// });
|
|
}
|