aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Services/Services/RoleService.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-23 16:01:05 +0200
committertranstrike <transtrike@gmail.com>2021-01-23 16:01:05 +0200
commit1f8d51c5393ea2f413de4f3e05f77d360d096ff3 (patch)
tree529dd85dfcae02a38ff6525c75c17db49f64bd91 /src/DevHive.Services/Services/RoleService.cs
parentdf06bc309d44db352441f42de7d34794a6ee54ba (diff)
downloadDevHive-1f8d51c5393ea2f413de4f3e05f77d360d096ff3.tar
DevHive-1f8d51c5393ea2f413de4f3e05f77d360d096ff3.tar.gz
DevHive-1f8d51c5393ea2f413de4f3e05f77d360d096ff3.zip
The beginning of role based authorization
Diffstat (limited to 'src/DevHive.Services/Services/RoleService.cs')
-rw-r--r--src/DevHive.Services/Services/RoleService.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/DevHive.Services/Services/RoleService.cs b/src/DevHive.Services/Services/RoleService.cs
index 896946d..91a8c73 100644
--- a/src/DevHive.Services/Services/RoleService.cs
+++ b/src/DevHive.Services/Services/RoleService.cs
@@ -20,12 +20,11 @@ namespace DevHive.Services.Services
this._roleMapper = mapper;
}
- public async Task<Guid> CreateRole(RoleServiceModel roleServiceModel)
+ public async Task<Guid> CreateRole(CreateRoleServiceModel roleServiceModel)
{
if (await this._roleRepository.DoesNameExist(roleServiceModel.Name))
throw new ArgumentException("Role already exists!");
-
Role role = this._roleMapper.Map<Role>(roleServiceModel);
bool success = await this._roleRepository.AddAsync(role);