From e8dce388512d72e92b61be12da803a42d76bd991 Mon Sep 17 00:00:00 2001 From: Hossein Rouhani <56231339+HRouhani@users.noreply.github.com> Date: Sun, 17 Dec 2023 20:48:07 +0100 Subject: [PATCH] adding a resource for teamsMeetPolicy (#2857) Signed-off-by: Hossein Rouhani --- providers/ms365/connection/teams_report.go | 3 ++- providers/ms365/resources/ms365.go | 1 + providers/ms365/resources/ms365.lr | 2 ++ providers/ms365/resources/ms365.lr.go | 12 ++++++++++++ providers/ms365/resources/ms365.lr.manifest.yaml | 1 + 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/providers/ms365/connection/teams_report.go b/providers/ms365/connection/teams_report.go index 1c6d36b00f..5ae8fe60d6 100644 --- a/providers/ms365/connection/teams_report.go +++ b/providers/ms365/connection/teams_report.go @@ -129,4 +129,5 @@ type CsTeamsMeetingPolicy struct { MeetingChatEnabledType string `json:"MeetingChatEnabledType"` DesignatedPresenterRoleMode string `json:"DesignatedPresenterRoleMode"` AllowExternalParticipantGiveRequestControl bool `json:"AllowExternalParticipantGiveRequestControl"` -} + AllowSecurityEndUserReporting bool `json:"AllowSecurityEndUserReporting"` +} \ No newline at end of file diff --git a/providers/ms365/resources/ms365.go b/providers/ms365/resources/ms365.go index ba3d07de80..d84650cd22 100644 --- a/providers/ms365/resources/ms365.go +++ b/providers/ms365/resources/ms365.go @@ -186,6 +186,7 @@ func initMs365Teams(runtime *plugin.Runtime, args map[string]*llx.RawData) (map[ "meetingChatEnabledType": llx.StringData(teamsPolicy.MeetingChatEnabledType), "designatedPresenterRoleMode": llx.StringData(teamsPolicy.DesignatedPresenterRoleMode), "allowExternalParticipantGiveRequestControl": llx.BoolData(teamsPolicy.AllowExternalParticipantGiveRequestControl), + "allowSecurityEndUserReporting": llx.BoolData(teamsPolicy.AllowSecurityEndUserReporting), }) if err != nil { return args, nil, err diff --git a/providers/ms365/resources/ms365.lr b/providers/ms365/resources/ms365.lr index 37f9b8580d..b89d7dce42 100644 --- a/providers/ms365/resources/ms365.lr +++ b/providers/ms365/resources/ms365.lr @@ -448,4 +448,6 @@ private ms365.teams.teamsMeetingPolicyConfig { designatedPresenterRoleMode string // Whether external participants can give or request control of the meeting allowExternalParticipantGiveRequestControl bool + // Whether users can report security concerns + allowSecurityEndUserReporting bool } \ No newline at end of file diff --git a/providers/ms365/resources/ms365.lr.go b/providers/ms365/resources/ms365.lr.go index 778ed1ba4b..3c5ac53e67 100644 --- a/providers/ms365/resources/ms365.lr.go +++ b/providers/ms365/resources/ms365.lr.go @@ -707,6 +707,9 @@ var getDataFields = map[string]func(r plugin.Resource) *plugin.DataRes{ "ms365.teams.teamsMeetingPolicyConfig.allowExternalParticipantGiveRequestControl": func(r plugin.Resource) *plugin.DataRes { return (r.(*mqlMs365TeamsTeamsMeetingPolicyConfig).GetAllowExternalParticipantGiveRequestControl()).ToDataRes(types.Bool) }, + "ms365.teams.teamsMeetingPolicyConfig.allowSecurityEndUserReporting": func(r plugin.Resource) *plugin.DataRes { + return (r.(*mqlMs365TeamsTeamsMeetingPolicyConfig).GetAllowSecurityEndUserReporting()).ToDataRes(types.Bool) + }, } func GetData(resource plugin.Resource, field string, args map[string]*llx.RawData) *plugin.DataRes { @@ -1515,6 +1518,10 @@ var setDataFields = map[string]func(r plugin.Resource, v *llx.RawData) bool { r.(*mqlMs365TeamsTeamsMeetingPolicyConfig).AllowExternalParticipantGiveRequestControl, ok = plugin.RawToTValue[bool](v.Value, v.Error) return }, + "ms365.teams.teamsMeetingPolicyConfig.allowSecurityEndUserReporting": func(r plugin.Resource, v *llx.RawData) (ok bool) { + r.(*mqlMs365TeamsTeamsMeetingPolicyConfig).AllowSecurityEndUserReporting, ok = plugin.RawToTValue[bool](v.Value, v.Error) + return + }, } func SetData(resource plugin.Resource, field string, val *llx.RawData) error { @@ -3552,6 +3559,7 @@ type mqlMs365TeamsTeamsMeetingPolicyConfig struct { MeetingChatEnabledType plugin.TValue[string] DesignatedPresenterRoleMode plugin.TValue[string] AllowExternalParticipantGiveRequestControl plugin.TValue[bool] + AllowSecurityEndUserReporting plugin.TValue[bool] } // createMs365TeamsTeamsMeetingPolicyConfig creates a new instance of this resource @@ -3613,3 +3621,7 @@ func (c *mqlMs365TeamsTeamsMeetingPolicyConfig) GetDesignatedPresenterRoleMode() func (c *mqlMs365TeamsTeamsMeetingPolicyConfig) GetAllowExternalParticipantGiveRequestControl() *plugin.TValue[bool] { return &c.AllowExternalParticipantGiveRequestControl } + +func (c *mqlMs365TeamsTeamsMeetingPolicyConfig) GetAllowSecurityEndUserReporting() *plugin.TValue[bool] { + return &c.AllowSecurityEndUserReporting +} diff --git a/providers/ms365/resources/ms365.lr.manifest.yaml b/providers/ms365/resources/ms365.lr.manifest.yaml index 8e1f032f61..6785a8cd73 100755 --- a/providers/ms365/resources/ms365.lr.manifest.yaml +++ b/providers/ms365/resources/ms365.lr.manifest.yaml @@ -296,6 +296,7 @@ resources: allowAnonymousUsersToStartMeeting: {} allowExternalParticipantGiveRequestControl: {} allowPSTNUsersToBypassLobby: {} + allowSecurityEndUserReporting: {} autoAdmittedUsers: {} designatedPresenterRoleMode: {} meetingChatEnabledType: {}