-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made the AuthenticatedMenuItem which currently works with Visibility …
…and IsEnabled [release]
- Loading branch information
1 parent
08f2064
commit b737450
Showing
20 changed files
with
330 additions
and
203 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
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
22 changes: 22 additions & 0 deletions
22
Dapplo.CaliburnMicro/Behaviors/Security/AuthenticationProperties.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,22 @@ | ||
namespace Dapplo.CaliburnMicro.Behaviors.Security | ||
{ | ||
/// <summary> | ||
/// This defines the property which is managed by authentication | ||
/// </summary> | ||
public enum AuthenticationProperties | ||
{ | ||
|
||
/// <summary> | ||
/// No influence | ||
/// </summary> | ||
None, | ||
/// <summary> | ||
/// Changes the IsEnabled | ||
/// </summary> | ||
IsEnabled, | ||
/// <summary> | ||
/// Changes the visibility | ||
/// </summary> | ||
Visibility | ||
} | ||
} |
54 changes: 54 additions & 0 deletions
54
Dapplo.CaliburnMicro/Behaviors/Security/INeedAuthentication.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,54 @@ | ||
#region Dapplo 2016 - GNU Lesser General Public License | ||
|
||
// Dapplo - building blocks for .NET applications | ||
// Copyright (C) 2016 Dapplo | ||
// | ||
// For more information see: http://dapplo.net/ | ||
// Dapplo repositories are hosted on GitHub: https://github.com/dapplo | ||
// | ||
// This file is part of Dapplo.CaliburnMicro | ||
// | ||
// Dapplo.CaliburnMicro is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// Dapplo.CaliburnMicro is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser General Public License for more details. | ||
// | ||
// You should have a copy of the GNU Lesser General Public License | ||
// along with Dapplo.CaliburnMicro. If not, see <http://www.gnu.org/licenses/lgpl.txt>. | ||
|
||
#endregion | ||
|
||
namespace Dapplo.CaliburnMicro.Behaviors.Security | ||
{ | ||
/// <summary> | ||
/// Base interface which an authenticated thing needs to implement | ||
/// </summary> | ||
/// <typeparam name="TWhen"></typeparam> | ||
public interface INeedAuthentication<out TWhen> | ||
{ | ||
/// <summary> | ||
/// This defines the property which is managed by authentication | ||
/// </summary> | ||
AuthenticationProperties AuthenticationProperty { get; } | ||
|
||
/// <summary> | ||
/// Permission(s) for which the item is managed | ||
/// </summary> | ||
string Permission { get; } | ||
|
||
/// <summary> | ||
/// What should be used when the permission is available | ||
/// </summary> | ||
TWhen WhenPermission { get; } | ||
|
||
/// <summary> | ||
/// What should be used when the permission is not available | ||
/// </summary> | ||
TWhen WhenPermissionMissing { get; } | ||
} | ||
} |
89 changes: 0 additions & 89 deletions
89
Dapplo.CaliburnMicro/Behaviors/Security/UiEnabledPermissionsAttribute.cs
This file was deleted.
Oops, something went wrong.
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.