|
@@ -279,6 +279,12 @@ func GetRoleList(adminid int64, companyId int64) ([]protocol.RoleGroup, error) { |
|
@@ -279,6 +279,12 @@ func GetRoleList(adminid int64, companyId int64) ([]protocol.RoleGroup, error) { |
279
|
log.Error("getRoleInfoByPid err:%s", err)
|
279
|
log.Error("getRoleInfoByPid err:%s", err)
|
280
|
return roleGroups, protocol.NewErrWithMessage("1")
|
280
|
return roleGroups, protocol.NewErrWithMessage("1")
|
281
|
}
|
281
|
}
|
|
|
282
|
+ if v.IsDefault == models.ROLE_DEFAULR {
|
|
|
283
|
+ for i := range roles {
|
|
|
284
|
+ roles[i].InDefaultGroup = 1
|
|
|
285
|
+ }
|
|
|
286
|
+ groups[k].InDefaultGroup = 1
|
|
|
287
|
+ }
|
282
|
rolegroup := protocol.RoleGroup{
|
288
|
rolegroup := protocol.RoleGroup{
|
283
|
RoleInfo: groups[k],
|
289
|
RoleInfo: groups[k],
|
284
|
Roles: roles,
|
290
|
Roles: roles,
|
|
@@ -294,7 +300,7 @@ func getRoleInfoByPid(companyid int64, pid int64) ([]protocol.RoleInfo, error) { |
|
@@ -294,7 +300,7 @@ func getRoleInfoByPid(companyid int64, pid int64) ([]protocol.RoleInfo, error) { |
294
|
)
|
300
|
)
|
295
|
var (
|
301
|
var (
|
296
|
err error
|
302
|
err error
|
297
|
- roles []protocol.RoleInfo
|
303
|
+ roles = make([]protocol.RoleInfo, 0)
|
298
|
)
|
304
|
)
|
299
|
err = utils.ExecuteQueryAll(&roles, dataSql, companyid, pid)
|
305
|
err = utils.ExecuteQueryAll(&roles, dataSql, companyid, pid)
|
300
|
return roles, err
|
306
|
return roles, err
|