public QueuesController(IQueueBusiness queueBusiness, IPermissionCheck permissionCheck, ILogger <QueuesController> logger) : base(permissionCheck, logger) { this.queueBusiness = queueBusiness; }
public UsersController(IUsersBusiness usersBusiness, IPermissionCheck permissionCheck, ILogger <UsersController> logger) : base(permissionCheck, logger) { this.usersBusiness = usersBusiness; }
public ValuesChangingController(ITokenCheck tokenCheck, ISetPermissionsToRole setPermissionsToRole, ISetUserRoles setUserRoles, IPermissionCheck permissionCheck) { this.tokenCheck = tokenCheck; this.setPermissionsToRole = setPermissionsToRole; this.setUserRoles = setUserRoles; this.permissionCheck = permissionCheck; }
public AppsController(IAppsBusiness appsBusiness, IPermissionCheck permissionCheck, ILogger <AppsController> logger) : base(permissionCheck, logger) { this.appsBusiness = appsBusiness; }
public InvitesController(SSOContext context, ITokenCheck tokenCheck, IPermissionCheck permissionCheck, IHttpClientFactory httpClientFactory) { _context = context; this.tokenCheck = tokenCheck; this.permissionCheck = permissionCheck; this.httpClientFactory = httpClientFactory; }
/// <summary> /// Run a permission check and return error if it failed /// </summary> /// <param name="permCheck"></param> /// <param name="grants"></param> /// <param name="exception"></param> /// <returns></returns> public static bool Ensure(this IPermissionCheck permCheck, List <Grants> grants, out HttpResponseException exception) { var wrapLog = permCheck.Log.Call("Ensure", () => $"[{string.Join(",", grants)}]", () => "or throw"); var ok = permCheck.UserMay(grants); exception = ok ? null : Http.PermissionDenied("required permissions for this request are not given"); wrapLog(ok ? "ok" : "permissions not ok"); return(ok); }
public GenericPermissionCheckCommandHandlerDecorator(ICommandHandler <TCommand> wrappedHandler, IIdentity currentUser, IPermissionCheck <TCommand> check) { this.wrappedHandler = wrappedHandler ?? throw new ArgumentNullException(nameof(wrappedHandler)); this.currentUser = currentUser; this.check = check ?? throw new ArgumentNullException(nameof(check)); }
public UserParametersController(ITokenCheck tokenCheck, IPermissionCheck permissionCheck) { this.tokenCheck = tokenCheck; this.permissionCheck = permissionCheck; }
public RolesController(ITokenCheck tokenCheck, IPermissionCheck permissionCheck) { this.tokenCheck = tokenCheck; this.permissionCheck = permissionCheck; }
protected ControllerBase(IPermissionCheck permissionCheck, ILogger <T> logger) { this.permissionCheck = permissionCheck; this.logger = logger; }
public CompanyAirportsController(SSOContext context, ITokenCheck tokenCheck, IPermissionCheck permissionCheck) { _context = context; this.tokenCheck = tokenCheck; this.permissionCheck = permissionCheck; }
public InviteRolesController(SSOContext context, ITokenCheck tokenCheck, IPermissionCheck permissionCheck) { _context = context; this.tokenCheck = tokenCheck; this.permissionCheck = permissionCheck; }