/// <summary> /// Add the users of a organization group as administrator in a community /// </summary> /// <param name="groupShortName">Short name of the group</param> /// <param name="organizationShortName">Short name of the user organization</param> public void UpgradeMembersOrganizationGroupToAdministrators(string organizationShortName, string groupShortName) { try { string url = $"{ApiUrl}/community/add-administrator-group"; GroupOrgCommunityModel model = new GroupOrgCommunityModel() { community_short_name = CommunityShortName, organization_short_name = organizationShortName, group_short_name = groupShortName }; string result = WebRequestPostWithJsonObject(url, model); Log.Debug($"All the members from the group { groupShortName} of { organizationShortName} has been upgraded to administrator in { CommunityShortName}. \r\n{result}"); } catch (Exception ex) { Log.Error($"Error upgrading to administrator the members from the group { groupShortName} of { organizationShortName} in { CommunityShortName}: {ex.Message}"); throw; } }
/// <summary> /// Delete the users of a organization group in a community /// </summary> /// <param name="groupShortName">Short name of the group</param> /// <param name="organizationShortName">Short name of the user organization</param> public void DeleteMemberOrganizationGroupFromCommunity(string organizationShortName, string groupShortName) { try { string url = $"{ApiUrl}/community/delete-group"; GroupOrgCommunityModel model = new GroupOrgCommunityModel() { community_short_name = CommunityShortName, organization_short_name = organizationShortName, group_short_name = groupShortName }; WebRequestPostWithJsonObject(url, model); Log.Debug($"All the members from the group {groupShortName} of {organizationShortName} has been deleted to {CommunityShortName}"); } catch (Exception ex) { Log.Error($"Error deleting the group members {groupShortName} of {organizationShortName} from {CommunityShortName}: {ex.Message} "); throw; } }
/// <summary> /// Register the users of a organization group in a community /// </summary> /// <param name="groupShortName">Short name of the group</param> /// <param name="organizationShortName">Short name of the user organization</param> /// <param name="identityType">Type of user identity in the community</param> public void AddMemberOrganizationGroupToCommunity(string organizationShortName, string groupShortName, short identityType) { try { string url = $"{ApiUrl}/community/add-members-organization-group-to-community"; GroupOrgCommunityModel model = new GroupOrgCommunityModel() { community_short_name = CommunityShortName, organization_short_name = organizationShortName, group_short_name = groupShortName, identity_type = identityType }; WebRequestPostWithJsonObject(url, model); Log.Debug($"The group {groupShortName} of {organizationShortName} has been added to {CommunityShortName}"); } catch (Exception ex) { Log.Error($"Error adding the group {groupShortName} of {organizationShortName} from {CommunityShortName}: {ex.Message} "); throw; } }