Meteor-Community-Packages / meteor-partitioner

Transparently divide a single meteor app into several different instances shared between different groups of users.
152 stars 18 forks source link

Admin user is not able to view all data from partitioned collection. #33

Open anarayn opened 6 years ago

anarayn commented 6 years ago

Admin users Partitioner treats users with admin: true as special. These users are able to see the entire contents of partitioned collections as well as all users when they are not assigned to a group, and operations will not result in errors.

Based on above instruction I created one user and for that I set admin:true.

{ "_id" : "rhecFqQhxwBXDAM9K", "createdAt" : ISODate("2018-05-27T13:29:34.344Z"), "services" : { "password" : { "bcrypt" : "$2b$10$aaGVwenkzz3v.7DECiZbmOR0kyRAfDZNu/K0Awng7ENcpxJqGrFgW" }, "resume" : { "loginTokens" : [ { "when" : ISODate("2018-05-27T13:39:50.328Z"), "hashedToken" : "PoEwIfRUR6RcAvPV1aNA8/t5wBXcvTKVQ4anfSD9W5k=" } ] } }, "username" : "1234567890", "emails" : [ { "address" : "admin@a.com", "verified" : false } ], "profile" : { "name" : "Admin" }, "roles" : [ "user", "admin" ], "admin" : true }

My expectation is this user will have permission for all groups but when this user subscribe to collection then it get below error

isClientSafe:true error:403 reason:"Must have group assigned to operate on partitioned collection" message:"Must have group assigned to operate on partitioned collection [403]" errorType:"Meteor.Error"

Any Idea what I am missing?

Thanks!