@@ -37,7 +37,6 @@ type CreateEntrustGroupModel struct {
3737// EntrustGroupModel Entrust group update model
3838type EntrustGroupModel struct {
3939 GroupId string `json:"groupId"` // Group ID
40- Name string `json:"name"` // Group name
4140 GroupProfile string `json:"groupProfile"` // Group basic information
4241 GroupExtProfile string `json:"groupExtProfile"` // Group extended information
4342 Permissions string `json:"permissions"` // Permission settings
@@ -273,9 +272,6 @@ func (rc *RongCloud) EntrustGroupCreate(group CreateEntrustGroupModel) (Response
273272 if group .Owner == "" {
274273 return result , RCErrorNew (1002 , "Parameter 'owner' is required" )
275274 }
276- if err := rc .validateUserIds (group .UserIds ); err != nil {
277- return result , err
278- }
279275
280276 req := httplib .Post (rc .rongCloudURI + "/entrust/group/create.json" )
281277 req .SetTimeout (time .Second * rc .timeout , time .Second * rc .timeout )
@@ -284,7 +280,9 @@ func (rc *RongCloud) EntrustGroupCreate(group CreateEntrustGroupModel) (Response
284280 req .Param ("groupId" , group .GroupId )
285281 req .Param ("name" , group .Name )
286282 req .Param ("owner" , group .Owner )
287- req .Param ("userIds" , strings .Join (removeDuplicates (group .UserIds ), "," ))
283+ if group .UserIds != nil {
284+ req .Param ("userIds" , strings .Join (removeDuplicates (group .UserIds ), "," ))
285+ }
288286 if group .GroupProfile != "" {
289287 req .Param ("groupProfile" , group .GroupProfile )
290288 }
@@ -322,9 +320,6 @@ func (rc *RongCloud) EntrustGroupUpdateProfile(group EntrustGroupModel) (Respons
322320 rc .fillHeader (req )
323321
324322 req .Param ("groupId" , group .GroupId )
325- if group .Name != "" {
326- req .Param ("name" , group .Name )
327- }
328323 if group .GroupProfile != "" {
329324 req .Param ("groupProfile" , group .GroupProfile )
330325 }
0 commit comments