|
@@ -405,7 +405,8 @@ func GetUserType(companyId int) (userType int, permissionStrnew string, err erro
|
|
|
func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.ActivityDetail) (havePower bool, err error) {
|
|
|
var companyDetailStatus string
|
|
|
var userTypeStr string
|
|
|
- if user.CompanyId == utils.HZ_COMPANY_ID {
|
|
|
+ //如果是弘则的用户或者宏观的权限不做校验
|
|
|
+ if user.CompanyId == utils.HZ_COMPANY_ID || activityInfo.ChartPermissionName == utils.HONG_GUAN_NAME {
|
|
|
havePower = true
|
|
|
return
|
|
|
}
|
|
@@ -472,7 +473,10 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
} else if (activityInfo.ActivityTypeId == 1 || activityInfo.ActivityTypeId == 3 || activityInfo.ActivityTypeId == 4 || activityInfo.ActivityTypeId == 5) && strings.Contains(permissionStr, "专家") {
|
|
|
havePower = true
|
|
|
}
|
|
|
-
|
|
|
+ if (strings.Contains(activityInfo.ChartPermissionName, "研选") || activityInfo.ChartPermissionName == "策略") && strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
|
|
|
+ havePower = true
|
|
|
+ return
|
|
|
+ }
|
|
|
if activityInfo.ActivityTypeId == 2 || activityInfo.ActivityTypeId == 6 || activityInfo.ActivityTypeId == 7 {
|
|
|
if strings.Contains(permissionStr, activityInfo.ChartPermissionName+"(主观)") {
|
|
|
havePower = true
|
|
@@ -490,9 +494,7 @@ func GetActivityDetailUserPower(user *models.WxUserItem, activityInfo *models.Ac
|
|
|
if !havePower {
|
|
|
return
|
|
|
}
|
|
|
- if (strings.Contains(activityInfo.ChartPermissionName, "研选") || activityInfo.ChartPermissionName == "策略") && strings.Contains(permissionStr, activityInfo.ChartPermissionName) {
|
|
|
- havePower = true
|
|
|
- }
|
|
|
+
|
|
|
//如果是易董的活动且属于研选类型,只要开通任何权限就可以查看详情
|
|
|
if activityInfo.YidongActivityId != "" && permissionStr != "" && strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
|
|
|
havePower = true
|