ow
This commit is contained in:
commit
f05d2d215f
678 files changed
+73865
No files matched your search
+80
@@ -0,0 +1,80 @@
|
||||
|
||||
using CloudBuilder.Core.DatabaseAccessor;
|
||||
using CloudBuilder.Core.Policy;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Transactions;
|
||||
using CloudBuilder.Core.Service;
|
||||
using CloudBuilder.Security.Service;
|
||||
using CloudBuilder.Core.DatabaseAccessor.Entity;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using CloudBuilder.Core.Policy;
|
||||
using CloudBuilder.Core.DependencyInjection.Request;
|
||||
using CloudBuilder.Security.Data;
|
||||
using CloudBuilder.Core.Authorization;
|
||||
using System;
|
||||
using CloudBuilder.Security.Entity;
|
||||
using CloudBuilder.Security.SearchCriteria;
|
||||
using CloudBuilder.Security;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace CloudBuilder.Web.Entry.Controllers.Security
|
||||
{
|
||||
[Authorize(AuthorizePolicy.PERMISSION)]
|
||||
[ApiController]
|
||||
[Route("[controller]/[action]")]
|
||||
public class YesNoPolicyController : ControllerBase
|
||||
{
|
||||
private readonly IApplicationService service;
|
||||
private readonly IYesNoPolicyService yesNoPolicyService;
|
||||
|
||||
public YesNoPolicyController(IApplicationService service, IYesNoPolicyService yesNoPolicyService)
|
||||
{
|
||||
this.service = service;
|
||||
this.yesNoPolicyService= yesNoPolicyService;
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public dynamic FindSelectOption(bool blank)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var result = yesNoPolicyService.FindSelectOption(blank);
|
||||
return result;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[HttpGet]
|
||||
public dynamic Copy()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
yesNoPolicyService.Copy();
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
catch (ValidatedException vex)
|
||||
{
|
||||
return vex;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ServiceErrorException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user