Skip to content

Commit d6eb799

Browse files
committed
Add MAML package to /LocalFeed folder after signed build and add additional validation for cmdlet
1 parent ee88df4 commit d6eb799

File tree

4 files changed

+36
-2
lines changed

4 files changed

+36
-2
lines changed

src/ResourceManager/Resources/Commands.Resources/Models.Authorization/AuthorizationClient.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,16 @@ private static void ValidateRoleDefinition(PSRoleDefinition roleDefinition)
235235
{
236236
throw new ArgumentException(ProjectResources.InvalidRoleDefinitionName);
237237
}
238+
239+
if (roleDefinition.AssignableScopes == null || !roleDefinition.AssignableScopes.Any())
240+
{
241+
throw new ArgumentException(ProjectResources.InvalidAssignableScopes);
242+
}
243+
244+
if (roleDefinition.Actions == null || !roleDefinition.Actions.Any())
245+
{
246+
throw new ArgumentException(ProjectResources.InvalidActions);
247+
}
238248
}
239249

240250
/// <summary>

src/ResourceManager/Resources/Commands.Resources/Properties/Resources.Designer.cs

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/Resources/Commands.Resources/Properties/Resources.resx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,18 @@
283283
<value>Registering provider feature ...</value>
284284
</data>
285285
<data name="InvalidRoleDefinitionName" xml:space="preserve">
286-
<value>RoleDefinitionName is invalid</value>
286+
<value>RoleDefinition Name is invalid</value>
287287
</data>
288288
<data name="RoleDefinitionWithIdNotFound" xml:space="preserve">
289289
<value>Cannot find role definition with id '{0}'.</value>
290290
</data>
291291
<data name="RemoveRoleDefinition" xml:space="preserve">
292292
<value>Are you sure you want to remove role definition with id '{0}'.</value>
293293
</data>
294+
<data name="InvalidActions" xml:space="preserve">
295+
<value>Invalid value for Actions</value>
296+
</data>
297+
<data name="InvalidAssignableScopes" xml:space="preserve">
298+
<value>Invalid value for AssignableScopes</value>
299+
</data>
294300
</root>
Binary file not shown.

0 commit comments

Comments
 (0)