<commit_before>module Rbac
  # This list is used to detemine whether RBAC, based on assigned tags, should be applied for a class in a search that is based on the class.
  # Classes should be added to this list ONLY after:
  # 1. It has been added to the MiqExpression::BASE_TABLES list
  # 2. Tagging has been enabled in the UI
  # 3. Class contains acts_as_miq_taggable
  CLASSES_THAT_PARTICIPATE_IN_RBAC = %w(
    AvailabilityZone
    CloudTenant
    ConfigurationProfile
    ConfiguredSystem
    Container
    ContainerGroup
    ContainerImage
    ContainerImageRegistry
    ContainerNode
    ContainerProject
    ContainerReplicator
    ContainerRoute
    ContainerService
    EmsCluster
    EmsFolder
    ExtManagementSystem
    Flavor
    Host
    MiqCimInstance
    OrchestrationTemplate
    OrchestrationStack
    ResourcePool
    SecurityGroup
    Service
    Storage
    VmOrTemplate
  )

  TAGGABLE_FILTER_CLASSES = CLASSES_THAT_PARTICIPATE_IN_RBAC - %w(EmsFolder)

  BELONGSTO_FILTER_CLASSES = %w(
    VmOrTemplate
    Host
    ExtManagementSystem
    EmsFolder
    EmsCluster
    ResourcePool
    Storage
  )

  MATCH_VIA_DESCENDANT_RELATIONSHIPS = {
    "VmOrTemplate::ExtManagementSystem"      => :ext_management_system,
    "VmOrTemplate::Host"                     => :host,
    "VmOrTemplate::EmsCluster"               => :ems_cluster,
    "VmOrTemplate::EmsFolder"                => :parent_blue_folders,
    "VmOrTemplate::ResourcePool"             => :resource_pool,
    "ConfiguredSystem::ExtManagementSystem"  => :ext_management_system,
    "ConfiguredSystem::ConfigurationProfile" => :configuration_profile<commit_msg>Revert "Removing ServiceTemplate from direct RBAC"<commit_after>module Rbac
  # This list is used to detemine whether RBAC, based on assigned tags, should be applied for a class in a search that is based on the class.
  # Classes should be added to this list ONLY after:
  # 1. It has been added to the MiqExpression::BASE_TABLES list
  # 2. Tagging has been enabled in the UI
  # 3. Class contains acts_as_miq_taggable
  CLASSES_THAT_PARTICIPATE_IN_RBAC = %w(
    AvailabilityZone
    CloudTenant
    ConfigurationProfile
    ConfiguredSystem
    Container
    ContainerGroup
    ContainerImage
    ContainerImageRegistry
    ContainerNode
    ContainerProject
    ContainerReplicator
    ContainerRoute
    ContainerService
    EmsCluster
    EmsFolder
    ExtManagementSystem
    Flavor
    Host
    MiqCimInstance
    OrchestrationTemplate
    OrchestrationStack
    ResourcePool
    SecurityGroup
    Service
    ServiceTemplate
    Storage
    VmOrTemplate
  )

  TAGGABLE_FILTER_CLASSES = CLASSES_THAT_PARTICIPATE_IN_RBAC - %w(EmsFolder)

  BELONGSTO_FILTER_CLASSES = %w(
    VmOrTemplate
    Host
    ExtManagementSystem
    EmsFolder
    EmsCluster
    ResourcePool
    Storage
  )

  MATCH_VIA_DESCENDANT_RELATIONSHIPS = {
    "VmOrTemplate::ExtManagementSystem"      => :ext_management_system,
    "VmOrTemplate::Host"                     => :host,
    "VmOrTemplate::EmsCluster"               => :ems_cluster,
    "VmOrTemplate::EmsFolder"                => :parent_blue_folders,
    "VmOrTemplate::ResourcePool"             => :resource_pool,
    "ConfiguredSystem::ExtManagementSystem"  => :ext_management_system,
    "ConfiguredSystem::ConfigurationProfile" => :configuration_profile
{'fraction_non_alphanumeric': 0.052710392333033845, 'fraction_numerical': 0.0017969451931716084, 'mean_word_length': 3.2225031605562577, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '7104961', 'n_tokens_mistral': 1026, 'n_tokens_neox': 982, 'n_words': 233}