forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔥 user model: default author role
refs TryGhost#7494 Our fixtures system is smart. You can define a user and a separated relation. Right now we always expect static id's for everything: roles, permissions, users. That's why we simply do for adding the owner: roles: [4] --> role id 4 So you can use separated relations or you can use a direct relation. This does not work when generating ObjectId's. Ok it could work if we decide to define for ALL static resources a static ID, but i think that is not needed at all. So this PR removes the default creation of an author role when user.roles is undefined or empty, to be able to create the owner without a static role id and instead use the fixture relation feature. I looked in this git history, the default author role was invented without explaining. See TryGhost@5c6d45f
- Loading branch information
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters