<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core.DomainModel
{
    public class TaskUsage : Entity
    {
        public int TaskRefId { get; set; }
        public int OrgUnitId { get; set; }

        public virtual TaskRef TaskRef { get; set; }
        public virtual OrganizationUnit OrgUnit { get; set; }

        public bool Starred { get; set; }
        public int TechnologyStatus { get; set; }
        public int UsageStatus { get; set; }
        public string Comment { get; set; }

        public override bool HasUserWriteAccess(User user)
        {
            return OrgUnit != null && OrgUnit.HasUserWriteAccess(user);
        }
    }
}<commit_msg>Added base check on has write access<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Core.DomainModel
{
    public class TaskUsage : Entity
    {
        public int TaskRefId { get; set; }
        public int OrgUnitId { get; set; }

        public virtual TaskRef TaskRef { get; set; }
        public virtual OrganizationUnit OrgUnit { get; set; }

        public bool Starred { get; set; }
        public int TechnologyStatus { get; set; }
        public int UsageStatus { get; set; }
        public string Comment { get; set; }

        public override bool HasUserWriteAccess(User user)
        {
            if (OrgUnit != null && OrgUnit.HasUserWriteAccess(user)) return true;

            return base.HasUserWriteAccess(user);
        }
    }
}
{'fraction_non_alphanumeric': 0.08430609597924774, 'fraction_numerical': 0.0, 'mean_word_length': 2.451901565995526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2986367', 'n_tokens_mistral': 430, 'n_tokens_neox': 420, 'n_words': 140}