Open chompomonim opened 8 years ago
After creating new role I can't see it in admin panel. What I'm doing wrong?
@roles = {} Roles.registerAction('news.update', true) setNewsRole = (role_name, country_id) -> unless @roles[role_name] @roles[role_name] = new Roles.Role role_name @roles[role_name].allow 'collections.news.index', true @roles[role_name].allow 'collections.news.insert', true @roles[role_name].allow 'news.update', (userId, doc, fields, modifier) -> return doc.userId is userId # Allowed to edit own news @roles[role_name].allow 'collections.news.showCreate', true @roles[role_name].allow 'collections.news.showUpdate', true if country_id @roles[role_name].helper 'collections.news.indexFilter', { 'country': country_id } Meteor.startup -> for country in Countries.find().fetch() setNewsRole("#{country.short_name}-admin", country._id)
BTW it can be related with migration into 2.1.2 (from 1.5.3) because before everything worked fine.
After creating new role I can't see it in admin panel. What I'm doing wrong?