mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Removed unused resetRoles method
- working on cleaning up our fixture mechanism and making it easier to understand
This commit is contained in:
parent
a967a8f930
commit
f1bc8026b7
1 changed files with 0 additions and 13 deletions
|
@ -264,19 +264,6 @@ const fixtures = {
|
|||
});
|
||||
},
|
||||
|
||||
resetRoles: function resetRoles() {
|
||||
return Promise.map(_.cloneDeep(DataGenerator.forKnex.users), function (user) {
|
||||
let userRolesRelations = _.filter(DataGenerator.forKnex.roles_users, {user_id: user.id});
|
||||
|
||||
userRolesRelations = _.map(userRolesRelations, function (userRolesRelation) {
|
||||
return _.find(DataGenerator.forKnex.roles, {id: userRolesRelation.role_id});
|
||||
});
|
||||
|
||||
user.roles = userRolesRelations;
|
||||
return models.User.edit(user, _.merge({id: user.id}, context.internal));
|
||||
});
|
||||
},
|
||||
|
||||
ensureUserForEachRole: async function ensureUserForEachRole() {
|
||||
const usersWithoutOwner = _.cloneDeep(DataGenerator.forKnex.users.slice(1));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue