Ejemplo n.º 1
0
 public UploadManager(IOptions <NanokaOptions> options, UploadTaskCollection tasks, IUserClaims claims, ILoggerFactory loggerFactory)
 {
     _options       = options.Value;
     _tasks         = tasks;
     _claims        = claims;
     _loggerFactory = loggerFactory;
 }
 public TaskManagerExerciseAuthorizationServerProvider(
     IUserValidator userValidator,
     IUserClaims userClaims)
 {
     _userValidator = userValidator;
     _userClaims    = userClaims;
 }
Ejemplo n.º 3
0
        public static (int start, int end)? GetRange(this IUserClaims claims)
        {
            if (int.TryParse(claims.QueryParams.GetValueOrDefault("start"), out var start) &&
                int.TryParse(claims.QueryParams.GetValueOrDefault("end"), out var end))
            {
                return(start, end);
            }

            return(null);
        }
Ejemplo n.º 4
0
 public UserController(IOptions <NanokaOptions> options, IUserRepository users, ILocker locker, IMapper mapper,
                       IUserClaims claims, PasswordHashHelper hash, SnapshotHelper snapshot, TokenManager tokens)
 {
     _options  = options.Value;
     _users    = users;
     _locker   = locker;
     _mapper   = mapper;
     _claims   = claims;
     _hash     = hash;
     _snapshot = snapshot;
     _tokens   = tokens;
 }
 public GetUsersController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
 public ClockOutEndWorkdayController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 7
0
 public GetWorkdayTypeController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
 public ClaimsController(IServiceProvider serviceProvider, IUser userRepository, IUserClaims userClaimsRepository)
 {
     this.serviceProvider      = serviceProvider;
     this.userRepository       = userRepository;
     this.userClaimsRepository = userClaimsRepository;
 }
Ejemplo n.º 9
0
 public UserHomepageController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 10
0
 public ClockInFlxTSignatureController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 11
0
 public static string GetReason(this IUserClaims claims) => claims.QueryParams.GetValueOrDefault("reason");
Ejemplo n.º 12
0
 public UserController(IDependencyInjector di, IUserManager userManager, IUserClaims userClaims) : base(di)
 {
     _userManager = userManager;
     _userClaims  = userClaims;
 }
Ejemplo n.º 13
0
 public static bool IsAdministrator(this IUserClaims claims)
 => claims.Permissions.HasFlag(UserPermissions.Administrator);
 public ClockInFlxTSignatureState(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 15
0
 public TokenManager(IOptions <NanokaOptions> options, IDistributedCache cache, IUserClaims claims)
 {
     _options = options.Value;
     _cache   = cache;
     _claims  = claims;
 }
Ejemplo n.º 16
0
 public SnapshotHelper(ISnapshotRepository snapshots, IUserClaims claims, ILogger <SnapshotHelper> logger)
 {
     _snapshots = snapshots;
     _claims    = claims;
     _logger    = logger;
 }
 public DeleteUserController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 18
0
 public static bool HasPermissions(this IUserClaims claims, UserPermissions required)
 => claims.IsAdministrator() || claims.Permissions.HasFlag(required);
Ejemplo n.º 19
0
 public UserRepository(myDbContext _db, IUserClaims userClaimsRepository, UserManager <ApplicationUser> _userManager)
 {
     db = _db;
     this.userClaimsRepository = userClaimsRepository;
     this._userManager         = _userManager;
 }
Ejemplo n.º 20
0
 public UpdateWorkdayController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 21
0
 public VoteHelper(IVoteRepository votes, IUserClaims claims, ILogger <VoteHelper> logger)
 {
     _votes  = votes;
     _claims = claims;
     _logger = logger;
 }
Ejemplo n.º 22
0
 public ChangePasswordController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
 public DeleteFixTSignatureController(ISqlDataAccess db, IUserClaims claims)
 {
     _db     = db;
     _claims = claims;
 }
Ejemplo n.º 24
0
 public static bool HasAnyPermission(this IUserClaims claims, UserPermissions requiredAny)
 => claims.IsAdministrator() || (claims.Permissions & requiredAny) != 0;