Class PermissionRepository
- Namespace
- Oqtane.Repository
- Assembly
- Oqtane.Server.dll
public class PermissionRepository : IPermissionRepository
- Inheritance
-
object
PermissionRepository
- Implements
-
Constructors
PermissionRepository(IDbContextFactory<TenantDBContext>, IRoleRepository, IMemoryCache, SiteState)
public PermissionRepository(IDbContextFactory<TenantDBContext> dbContextFactory, IRoleRepository roles, IMemoryCache cache, SiteState siteState)
Parameters
dbContextFactory
IDbContextFactory<TenantDBContext>
roles
IRoleRepository
cache
IMemoryCache
siteState
SiteState
Methods
AddPermission(Permission)
public Permission AddPermission(Permission permission)
Parameters
permission
Permission
Returns
- Permission
DeletePermission(int)
public void DeletePermission(int permissionId)
Parameters
permissionId
int
DeletePermissions(int, string, int)
public void DeletePermissions(int siteId, string entityName, int entityId)
Parameters
siteId
int
entityName
string
entityId
int
GetPermission(int)
public Permission GetPermission(int permissionId)
Parameters
permissionId
int
Returns
- Permission
GetPermissions(int, string)
public IEnumerable<Permission> GetPermissions(int siteId, string entityName)
Parameters
siteId
int
entityName
string
Returns
- IEnumerable<Permission>
GetPermissions(int, string, int)
public IEnumerable<Permission> GetPermissions(int siteId, string entityName, int entityId)
Parameters
siteId
int
entityName
string
entityId
int
Returns
- IEnumerable<Permission>
GetPermissions(int, string, int, string)
public IEnumerable<Permission> GetPermissions(int siteId, string entityName, int entityId, string permissionName)
Parameters
siteId
int
entityName
string
entityId
int
permissionName
string
Returns
- IEnumerable<Permission>
GetPermissions(int, string, string)
public IEnumerable<Permission> GetPermissions(int siteId, string entityName, string permissionName)
Parameters
siteId
int
entityName
string
permissionName
string
Returns
- IEnumerable<Permission>
UpdatePermission(Permission)
public Permission UpdatePermission(Permission permission)
Parameters
permission
Permission
Returns
- Permission
UpdatePermissions(int, string, int, List<Permission>)
public void UpdatePermissions(int siteId, string entityName, int entityId, List<Permission> permissions)
Parameters
siteId
int
entityName
string
entityId
int
permissions
List<Permission>