Dynamic User Roles
This commit is contained in:
21
Oqtane.Client/Services/Interfaces/IRoleService.cs
Normal file
21
Oqtane.Client/Services/Interfaces/IRoleService.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
public interface IRoleService
|
||||
{
|
||||
Task<List<Role>> GetRolesAsync();
|
||||
|
||||
Task<List<Role>> GetRolesAsync(int SiteId);
|
||||
|
||||
Task<Role> GetRoleAsync(int RoleId);
|
||||
|
||||
Task<Role> AddRoleAsync(Role Role);
|
||||
|
||||
Task<Role> UpdateRoleAsync(Role Role);
|
||||
|
||||
Task DeleteRoleAsync(int RoleId);
|
||||
}
|
||||
}
|
16
Oqtane.Client/Services/Interfaces/IUserRoleService.cs
Normal file
16
Oqtane.Client/Services/Interfaces/IUserRoleService.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using Oqtane.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Oqtane.Services
|
||||
{
|
||||
public interface IUserRoleService
|
||||
{
|
||||
Task<List<UserRole>> GetUserRolesAsync();
|
||||
Task<List<UserRole>> GetUserRolesAsync(int UserId);
|
||||
Task<UserRole> GetUserRoleAsync(int UserRoleId);
|
||||
Task<UserRole> AddUserRoleAsync(UserRole UserRole);
|
||||
Task<UserRole> UpdateUserRoleAsync(UserRole UserRole);
|
||||
Task DeleteUserRoleAsync(int UserRoleId);
|
||||
}
|
||||
}
|
@ -6,11 +6,11 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface IUserService
|
||||
{
|
||||
Task<List<User>> GetUsersAsync();
|
||||
Task<List<User>> GetUsersAsync(int SiteId);
|
||||
|
||||
Task<User> GetUserAsync(int UserId);
|
||||
Task<User> GetUserAsync(int UserId, int SiteId);
|
||||
|
||||
Task<User> GetUserAsync(string Username);
|
||||
Task<User> GetUserAsync(string Username, int SiteId);
|
||||
|
||||
Task<User> AddUserAsync(User User);
|
||||
|
||||
@ -18,8 +18,6 @@ namespace Oqtane.Services
|
||||
|
||||
Task DeleteUserAsync(int UserId);
|
||||
|
||||
Task<User> GetCurrentUserAsync();
|
||||
|
||||
Task<User> LoginUserAsync(User User);
|
||||
|
||||
Task LogoutUserAsync();
|
||||
|
Reference in New Issue
Block a user