egg-born-module-a-base-sync
Advanced tools
Comparing version 4.8.45 to 4.8.46
@@ -121,4 +121,3 @@ // maybe modified by user | ||
const atomStage = item.atomStage; | ||
const isAtomClassRole = atomClass.module === 'a-base' && atomClass.atomClassName === 'role'; | ||
if (!isAtomClassRole && atomClassBase.resource && atomStage === 1) { | ||
if (atomClassBase.resource && atomStage === 1) { | ||
// update locales | ||
@@ -132,13 +131,16 @@ if (item.atomName) { | ||
// role | ||
// check if any role exists | ||
const right = await this.modelResourceRole.get({ | ||
atomId, | ||
}); | ||
if (!right) { | ||
// always add role of template.system when no records | ||
const roleSystem = await this.ctx.bean.role.parseRoleName({ roleName: 'template.system' }); | ||
await this.ctx.bean.resource.addResourceRole({ | ||
const isAtomClassRole = atomClass.module === 'a-base' && atomClass.atomClassName === 'role'; | ||
if (!isAtomClassRole) { | ||
// check if any role exists | ||
const right = await this.modelResourceRole.get({ | ||
atomId, | ||
roleId: roleSystem.id, | ||
}); | ||
if (!right) { | ||
// always add role of template.system when no records | ||
const roleSystem = await this.ctx.bean.role.parseRoleName({ roleName: 'template.system' }); | ||
await this.ctx.bean.resource.addResourceRole({ | ||
atomId, | ||
roleId: roleSystem.id, | ||
}); | ||
} | ||
} | ||
@@ -145,0 +147,0 @@ } |
{ | ||
"name": "egg-born-module-a-base-sync", | ||
"version": "4.8.45", | ||
"version": "4.8.46", | ||
"title": "Base", | ||
@@ -5,0 +5,0 @@ "eggBornModule": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3724105
61423