public IActionResult AddProjectToUserGroupByCode(long projectId, [FromBody] AssignPermissionToSingleUserGroupContract data) { m_authorizationManager.AuthorizeBookOrPermission(projectId, PermissionFlag.AdminProject, PermissionNames.AssignPermissionsToRoles); m_permissionManager.AddBookToSingleUserGroup(projectId, data.Code, data.Permissions); return(Ok()); }
public void AddProjectToUserGroupByCode(long projectId, AssignPermissionToSingleUserGroupContract data) { try { m_client.Post <object>($"project/{projectId}/single-user-group", data); } catch (HttpRequestException e) { if (m_logger.IsErrorEnabled()) { m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e); } throw; } }