-
Notifications
You must be signed in to change notification settings - Fork 3
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 #479 from Strongminds/release/12.0.4
Release/12.0.4
- Loading branch information
Showing
473 changed files
with
24,793 additions
and
6,361 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
14 changes: 14 additions & 0 deletions
14
Core.ApplicationServices/Authorization/CommandPermissionResult.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,14 @@ | ||
namespace Core.ApplicationServices.Authorization | ||
{ | ||
public class CommandPermissionResult | ||
{ | ||
public CommandPermissionResult(string id, bool canExecute) | ||
{ | ||
Id = id; | ||
CanExecute = canExecute; | ||
} | ||
|
||
public string Id { get; } | ||
public bool CanExecute { get; } | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
Core.ApplicationServices/Authorization/ResourceCollectionPermissionsResult.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,21 @@ | ||
using Core.DomainModel; | ||
|
||
namespace Core.ApplicationServices.Authorization | ||
{ | ||
public class ResourceCollectionPermissionsResult | ||
{ | ||
public bool Create{ get; } | ||
|
||
public ResourceCollectionPermissionsResult(bool create) | ||
{ | ||
Create = create; | ||
} | ||
|
||
public static ResourceCollectionPermissionsResult FromOrganizationId<T>( | ||
int organizationId, | ||
IAuthorizationContext authorizationContext) where T : IEntity | ||
{ | ||
return new ResourceCollectionPermissionsResult(authorizationContext.AllowCreate<T>(organizationId)); | ||
} | ||
} | ||
} |
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.