PaymentModel IAccountService.CreatePayment(ApplicationVersion applicationVersion, PaymentRowModel payment, FileModel file) { return(RunSecurity(applicationVersion, (user) => { if (!user.Rights.Contains("CreatePayment", StringComparer.InvariantCultureIgnoreCase)) { throw new SecurityAccessDeniedException("У вас нет прав создать оплату"); } return _RepositoryAccount.CreatePayment(payment, file, user); })); }