caipin hace 4 años
padre
commit
59ab9933eb

+ 3 - 0
comm/functions.go

@@ -45,6 +45,9 @@ func MakeProjectAccountVM(modelsAccount *models.CmProjectAccount) viewmodels.Pro
 	viewAccountData.AccountGroup = modelsAccount.AccountGroup
 	viewAccountData.Enable = modelsAccount.Enable
 	viewAccountData.Position = modelsAccount.Position
+	viewAccountData.ContractPermission = modelsAccount.ContractPermission
+	viewAccountData.QualityPermission = modelsAccount.QualityPermission
+	viewAccountData.SafePermission = modelsAccount.SafePermission
 
 	return viewAccountData
 }

+ 4 - 3
lib/permission.json

@@ -14,12 +14,13 @@
     },
     "safe": {
         "add": [
-            "1",
+            "/api/safe",
             "2",
             "3"
         ],
         "access": [
-            "/api/contract/survey"
+            "/api/contract/folder",
+            "/api/safe/detail"
         ],
         "delete":[
             ""
@@ -32,7 +33,7 @@
             "3"
         ],
         "access": [
-            "/api/contract/survey"
+            "/api/contract/folder"
         ],
         "delete":[
 

+ 0 - 2
web/api/project_setting_auth_api.go

@@ -115,11 +115,9 @@ func (c *ProjectSettingApi) PostBidAccountCreate() {
 // @Param   contractAdd    body    int     false        "合同创建 1拥有0不拥有"
 // @Param   contractDelete        body    int     false        "合同删除 1拥有0不拥有"
 // @Param   contractAccess        body    int     false        "合同查看 1拥有0不拥有"
-
 // @Param   safeAdd    body    int     false        "安全创建 1拥有0不拥有"
 // @Param   safeDelete        body    int     false        "安全删除 1拥有0不拥有"
 // @Param   safeAccess        body    int     false        "安全查看 1拥有0不拥有"
-
 // @Param   qualityAdd    body    int     false        "合同创建 1拥有0不拥有"
 // @Param   qualityDelete        body    int     false        "合同删除 1拥有0不拥有"
 // @Param   qualityAccess        body    int     false        "合同查看 1拥有0不拥有"

+ 16 - 13
web/viewmodels/project_account.go

@@ -13,19 +13,22 @@ import (
 )
 
 type ProjectAccount struct {
-	Id           string `form:"id" json:"id"`
-	ProjectId    string `form:"projectId" json:"projectId"`
-	Account      string `form:"account" json:"account"`
-	Password     string `form:"password" json:"password"`
-	Name         string `form:"name" json:"name"`
-	Company      string `form:"company" json:"company"`
-	Position     string `form:"position" json:"position"`
-	Role         string `form:"role" json:"role"`
-	Mobile       string `form:"mobile" json:"mobile"`
-	Telephone    string `form:"telephone" json:"telephone"`
-	IsAdmin      int    `form:"isAdmin" json:"isAdmin"`
-	AccountGroup int    `form:"accountGroup" json:"accountGroup"`
-	Enable       int    `form:"enable" json:"enable"`
+	Id                 string `form:"id" json:"id"`
+	ProjectId          string `form:"projectId" json:"projectId"`
+	Account            string `form:"account" json:"account"`
+	Password           string `form:"password" json:"password"`
+	Name               string `form:"name" json:"name"`
+	Company            string `form:"company" json:"company"`
+	Position           string `form:"position" json:"position"`
+	Role               string `form:"role" json:"role"`
+	Mobile             string `form:"mobile" json:"mobile"`
+	Telephone          string `form:"telephone" json:"telephone"`
+	IsAdmin            int    `form:"isAdmin" json:"isAdmin"`
+	AccountGroup       int    `form:"accountGroup" json:"accountGroup"`
+	Enable             int    `form:"enable" json:"enable"`
+	ContractPermission string `form:"contractPermission" json:"contractPermission"`
+	QualityPermission  string `form:"qualityPermission" json:"qualityPermission"`
+	SafePermission     string `form:"safePermission" json:"safePermission"`
 }
 
 type AccountPassword struct {