mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-11-28 17:32:44 +08:00
Moving permissions in namespace, adding IUser and IAuthorizationService
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4039267
This commit is contained in:
@@ -145,8 +145,10 @@
|
|||||||
<Compile Include="Notify\NotifierExtensions.cs" />
|
<Compile Include="Notify\NotifierExtensions.cs" />
|
||||||
<Compile Include="Notify\NotifyEntry.cs" />
|
<Compile Include="Notify\NotifyEntry.cs" />
|
||||||
<Compile Include="Notify\NotifyFilter.cs" />
|
<Compile Include="Notify\NotifyFilter.cs" />
|
||||||
<Compile Include="Security\IPermissionProvider.cs" />
|
<Compile Include="Security\IAuthorizationService.cs" />
|
||||||
<Compile Include="Security\Permission.cs" />
|
<Compile Include="Security\IUser.cs" />
|
||||||
|
<Compile Include="Security\Permissions\IPermissionProvider.cs" />
|
||||||
|
<Compile Include="Security\Permissions\Permission.cs" />
|
||||||
<Compile Include="Services\Clock.cs" />
|
<Compile Include="Services\Clock.cs" />
|
||||||
<Compile Include="Storage\FileSystemStorageProvider.cs" />
|
<Compile Include="Storage\FileSystemStorageProvider.cs" />
|
||||||
<Compile Include="Storage\IStorageFile.cs" />
|
<Compile Include="Storage\IStorageFile.cs" />
|
||||||
|
|||||||
7
src/Orchard/Security/IAuthorizationService.cs
Normal file
7
src/Orchard/Security/IAuthorizationService.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
using Orchard.Security.Permissions;
|
||||||
|
|
||||||
|
namespace Orchard.Security {
|
||||||
|
public interface IAuthorizationService : IDependency {
|
||||||
|
bool CheckAccess(IUser user, Permission permission);
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/Orchard/Security/IUser.cs
Normal file
7
src/Orchard/Security/IUser.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
using Orchard.Models;
|
||||||
|
|
||||||
|
namespace Orchard.Security {
|
||||||
|
public interface IUser : IModel {
|
||||||
|
string Name { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Orchard.Security {
|
namespace Orchard.Security.Permissions {
|
||||||
public interface IPermissionProvider {
|
public interface IPermissionProvider {
|
||||||
string PackageName { get; }
|
string PackageName { get; }
|
||||||
IEnumerable<Permission> GetPermissions();
|
IEnumerable<Permission> GetPermissions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace Orchard.Security {
|
namespace Orchard.Security.Permissions {
|
||||||
public class Permission {
|
public class Permission {
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user