-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3580 from KoenZomers/Issue3565
Adding ModerationSettings to Teams Channel cmdlets
- Loading branch information
Showing
14 changed files
with
299 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/Commands/Enums/TeamChannelModerationSettingNewMessageRestriction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace PnP.PowerShell.Commands.Enums | ||
{ | ||
/// <summary> | ||
/// All allowed options for Team Channel post new message restrictions within the moderation settings of a Microsoft Teams team | ||
/// </summary> | ||
/// <remarks>Documentation: https://learn.microsoft.com/graph/api/resources/channelmoderationsettings#properties</remarks> | ||
public enum TeamChannelModerationSettingNewMessageRestriction | ||
{ | ||
/// <summary> | ||
/// Everyone can create new posts in the channel | ||
/// </summary> | ||
Everyone, | ||
|
||
/// <summary> | ||
/// Everyone except guests can create new posts in the channel | ||
/// </summary> | ||
EveryoneExceptGuests, | ||
|
||
/// <summary> | ||
/// Moderators can create new posts in the channel | ||
/// </summary> | ||
Moderators | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/Commands/Enums/TeamChannelModerationSettingReplyRestriction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace PnP.PowerShell.Commands.Enums | ||
{ | ||
/// <summary> | ||
/// All allowed options for Team Channel reply restrictions within the moderation settings of a Microsoft Teams team | ||
/// </summary> | ||
/// <remarks>Documentation: https://learn.microsoft.com/graph/api/resources/channelmoderationsettings#properties</remarks> | ||
public enum TeamChannelModerationSettingReplyRestriction | ||
{ | ||
/// <summary> | ||
/// Everyone can reply in the channel | ||
/// </summary> | ||
Everyone, | ||
|
||
/// <summary> | ||
/// Only authors and moderators can reply in the channel | ||
/// </summary> | ||
AuthorAndModerators | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace PnP.PowerShell.Commands.Model.Teams | ||
{ | ||
/// <summary> | ||
/// Moderation settings on a Teams Channel | ||
/// </summary> | ||
/// <remarks>Documentation at https://learn.microsoft.com/graph/api/resources/channelmoderationsettings</remarks> | ||
public partial class ChannelModerationSettings | ||
{ | ||
#region Public Members | ||
|
||
/// <summary> | ||
/// Indicates whether bots are allowed to post messages | ||
/// </summary> | ||
[JsonPropertyName("allowNewMessageFromBots")] | ||
public bool? AllowNewMessageFromBots { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates whether connectors are allowed to post messages | ||
/// </summary> | ||
[JsonPropertyName("allowNewMessageFromConnectors")] | ||
public bool? AllowNewMessageFromConnectors { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates who is allowed to reply to the teams channel | ||
/// </summary> | ||
[JsonPropertyName("replyRestriction")] | ||
public Enums.TeamChannelModerationSettingReplyRestriction? ReplyRestriction { get; set; } | ||
|
||
/// <summary> | ||
/// Indicates who is allowed to post messages to teams channel | ||
/// </summary> | ||
[JsonPropertyName("userNewMessageRestriction")] | ||
public Enums.TeamChannelModerationSettingNewMessageRestriction? UserNewMessageRestriction { get; set; } | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.