Meteor-Community-Packages/meteor-roles

Internal function _getInheritedRoleNames() should return role object

開放

#304 建立於 2019年12月10日

 (0 則留言) (0 個反應) (0 位負責人)JavaScript (161 個分叉)batch import
enhancementgood first issue

倉庫指標

星標
 (919 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

https://github.com/Meteor-Community-Packages/meteor-roles/blob/32c230ded9cb92b27a3485d143cabf2732fef186/roles/roles_common.js#L543-L557

The function _getInheritedRoleNames() is currently used to construct the array inheritedRoles on a role-assignment, where it only takes over the parameter _id. If you have data stored on the role, wouldn't it be better to have it copied along?

If one of these parameter changes, the programmer extending this package would then be responsible for also keeping this data updated there. If he doesn't need it there, he can extend this package wrapping this function to remove the additional properties.

貢獻者指南