Browse Source

Merge branch 'rel-4.4' of https://github.com/abpframework/abp into rel-4.4

pull/9930/head
Alper Ebicoglu 5 years ago
parent
commit
188c5c91b6
  1. 6
      docs/en/Modules/Permission-Management.md
  2. 2
      docs/en/Modules/Setting-Management.md
  3. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

6
docs/en/Modules/Permission-Management.md

@ -28,7 +28,7 @@ In this dialog, you can grant permissions for the selected role. The tabs in the
## IPermissionManager
`IPermissionManager` is the main service provided by this module. It is used to read and change the permission values. `IPermissionManager` is typically used by the *Feature Management Dialog*. However, you can inject it if you need to set a permission value.
`IPermissionManager` is the main service provided by this module. It is used to read and change the permission values. `IPermissionManager` is typically used by the *Permission Management Dialog*. However, you can inject it if you need to set a permission value.
> If you just want to read/check permission values for the current user, use the `IAuthorizationService` or the `[Authorize]` attribute as explained in the [Authorization document](../Authorization.md).
@ -91,9 +91,9 @@ public class CustomPermissionManagementProvider : PermissionManagementProvider
}
````
`PermissionManagementProvider` base class makes the default implementation (using the `IPermissionGrantRepository`) for you. You can override base methods as you need. Every provider must have a unique name, which is `Custom` in this example (keep it short since it is saved to database for each feature value record).
`PermissionManagementProvider` base class makes the default implementation (using the `IPermissionGrantRepository`) for you. You can override base methods as you need. Every provider must have a unique name, which is `Custom` in this example (keep it short since it is saved to database for each permission value record).
Once you create your provider class, you should register it using the `FeatureManagementOptions` [options class](../Options.md):
Once you create your provider class, you should register it using the `PermissionManagementOptions` [options class](../Options.md):
````csharp
Configure<PermissionManagementOptions>(options =>

2
docs/en/Modules/Setting-Management.md

@ -99,7 +99,7 @@ public class CustomSettingProvider : SettingManagementProvider
}
````
`SettingManagementProvider` base class makes the default implementation (using the `ISettingManagementStore`) for you. You can override base methods as you need. Every provider must have a unique name, which is `Custom` in this example (keep it short since it is saved to database for each feature value record).
`SettingManagementProvider` base class makes the default implementation (using the `ISettingManagementStore`) for you. You can override base methods as you need. Every provider must have a unique name, which is `Custom` in this example (keep it short since it is saved to database for each setting value record).
Once you create your provider class, you should register it using the `SettingManagementOptions` [options class](../Options.md):

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectModification/SolutionModuleAdder.cs

@ -244,7 +244,7 @@ namespace Volo.Abp.Cli.ProjectModification
foreach (var projectToRemove in projectsToRemove)
{
if (IsReferencedByAnotherModuleProject(moduleDirectory, projectsToRemove, projectToRemove))
if (IsReferencedByAnotherProject(solutionDirectory, projectsToRemove, projectToRemove))
{
continue;
}
@ -253,10 +253,10 @@ namespace Volo.Abp.Cli.ProjectModification
}
}
private bool IsReferencedByAnotherModuleProject(string moduleDirectory, List<string> projectsToRemove, string projectToRemove)
private bool IsReferencedByAnotherProject(string solutionDirectory, List<string> projectsToRemove, string projectToRemove)
{
var moduleProjects = Directory.GetFiles(moduleDirectory, "*.csproj", SearchOption.AllDirectories);
var projectsToKeep = moduleProjects.Where(mp => !projectsToRemove.Contains(Path.GetFileName(mp).RemovePostFix(".csproj"))).ToList();
var projects = Directory.GetFiles(solutionDirectory, "*.csproj", SearchOption.AllDirectories);
var projectsToKeep = projects.Where(mp => !projectsToRemove.Contains(Path.GetFileName(mp).RemovePostFix(".csproj"))).ToList();
return projectsToKeep.Select(File.ReadAllText).Any(content => content.Contains($"\"{projectToRemove}\""));
}

Loading…
Cancel
Save