<commit_before>﻿using System;
using System.Web.Http;
using System.Web.OData;
using System.Web.OData.Query;
using Core.ApplicationServices;
using Core.DomainModel;
using Core.DomainModel.ItSystem;
using Core.DomainServices;
using Ninject;

namespace Presentation.Web.Controllers.OData
{
    //[Authorize]
    public abstract class BaseController<T> : ODataController where T : class 
    {
        protected ODataValidationSettings ValidationSettings;
        protected IGenericRepository<T> Repository;
        private User _curentUser;

        [Inject]
        public IGenericRepository<User> UserRepository { get; set; }

        [Inject]
        public IAuthenticationService AuthenticationService { get; set; }

        protected BaseController(IGenericRepository<T> repository)
        {
            ValidationSettings = new ODataValidationSettings { AllowedQueryOptions = AllowedQueryOptions.All };
            Repository = repository;
        }


        public User CurentUser
        {<commit_msg>Re-Added Authorize to basecontroller<commit_after>﻿using System;
using System.Web.Http;
using System.Web.OData;
using System.Web.OData.Query;
using Core.ApplicationServices;
using Core.DomainModel;
using Core.DomainModel.ItSystem;
using Core.DomainServices;
using Ninject;

namespace Presentation.Web.Controllers.OData
{
    [Authorize]
    public abstract class BaseController<T> : ODataController where T : class 
    {
        protected ODataValidationSettings ValidationSettings;
        protected IGenericRepository<T> Repository;
        private User _curentUser;

        [Inject]
        public IGenericRepository<User> UserRepository { get; set; }

        [Inject]
        public IAuthenticationService AuthenticationService { get; set; }

        protected BaseController(IGenericRepository<T> repository)
        {
            ValidationSettings = new ODataValidationSettings { AllowedQueryOptions = AllowedQueryOptions.All };
            Repository = repository;
        }


        public User CurentUser
        {
{'fraction_non_alphanumeric': 0.07027027027027027, 'fraction_numerical': 0.0, 'mean_word_length': 3.3044397463002113, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5445878', 'n_tokens_mistral': 529, 'n_tokens_neox': 516, 'n_words': 129}