<commit_before>admin: rule:context_is_cloud_admin or is_admin:True
primary_zone: target.zone_type:SECONDARY

owner: tenant:%(tenant_id)s
target: tenant:%(target_tenant_id)s
shared: "'True':%(zone_shared)s"

owner_or_target: rule:target or rule:owner
owner_or_zone_shared: rule:target or rule:shared

admin_or_owner_or_zone_shared: rule:owner_or_zone_shared or rule:admin
dns_admin: role:dns_admin and rule:owner

member: role:member and rule:owner
member_and_shared: role:member and rule:owner_or_zone_shared

viewer: role:dns_viewer and rule:owner
viewer_and_shared: role:dns_viewer and rule:owner_or_zone_shared
cloud_dns_viewer: role:cloud_dns_viewer

context_is_cloud_admin: role:cloud_dns_admin
context_is_dns_ops: rule:context_is_cloud_admin or role:cloud_dns_ops or rule:admin
context_is_dns_support: rule:context_is_dns_ops or role:cloud_dns_support
context_is_zonemaster: rule:context_is_dns_support or (role:dns_zonemaster and rule:owner)
context_is_hostmaster: rule:context_is_dns_support or (role:dns_hostmaster and rule:owner)
context_is_mailmaster: rule:context_is_dns_support or (role:dns_mailmaster and rule:owner)
context_is_webmaster: rule:context_is_dns_support or rule:context_is_mailmaster or rule:context_is_hostmaster or (role:dns_webmaster and rule:owner)
context_is_editor: rule:dns_admin or rule:member or rule:admin
context_is_viewer: rule:viewer_and_shared or rule:member_and_shared or rule:context_is_master or rule:context_is_editor or rule:viewer or rule:member or rule:cloud_dns_viewer
context_is_master: rule:context_is_dns_support or rule:context_is_zonemaster or rule:context_is_hostmaster or rule:context_is_mailmaster or rule:context_is_webmaster or rule:context_is_editor

zone_primary_or_dns_ops: "('PRIMARY':%(zone_type)s and rule:context_is_dns_ops) or ('SECONDARY':%(zone_type)s and is_admin:True)"

default: rule:context_is_viewer
all_tenants: rule:context_is_dns_support or rule:cloud_dns_viewer
edit_managed_records: rule:context_is_master
use_low_ttl: rule:context_is_dns_support
get_quotas: rule:context_is_viewer
get_quota: rule:context_is_viewer
set_quota: rule:admin
reset_quotas: rule:admin
create_tld: rule:admin
find_tlds: rule:admin
get_tld: rule:admin
update_tld: rule:admin
delete_tld: rule:admin
create_tsigkey: rule:admin
find_tsigkeys: rule:admin
get_tsigkey: rule:admin
update_tsigkey: rule:admin
delete_tsigkey: rule:admin
find_tenants: rule:admin or rule:context_is_dns_ops
get_tenant: rule:admin or rule:context_is_dns_ops
count_tenants: rule:admin or rule:context_is_dns_ops
share_zone: rule:context_is_zonemaster
unshare_zone: rule:context_is_zonemaster
create_zone: rule:context_is_dns_ops
move_zone: rule:context_is_dns_ops
create_sub_zone: rule:context_is_zonemaster
create_super_zone: rule:context_is_cloud_admin
get_zones: rule:context_is_viewer
get_zone: rule:context_is_viewer
get_shared_zone: rule:context_is_viewer
get_zone_servers: rule:context_is_viewer
find_zones: rule:context_is_viewer
find_zone: rule:context_is_viewer
find_shared_zones: rule:context_is_viewer
update_zone: rule:context_is_master
update_sub_zone: rule:context_is_master
delete_zone: rule:context_is_master
xfr_zone: rule:context_is_master
abandon_zone: rule:context_is_dns_ops
count_zones: rule:context_is_viewer
count_zones_pending_notify: rule:context_is_viewer<commit_msg>[designate] allow sharing the zone to any dns_*master role.<commit_after>admin: rule:context_is_cloud_admin or is_admin:True
primary_zone: target.zone_type:SECONDARY

owner: tenant:%(tenant_id)s
target: tenant:%(target_tenant_id)s
shared: "'True':%(zone_shared)s"

owner_or_target: rule:target or rule:owner
owner_or_zone_shared: rule:target or rule:shared

admin_or_owner_or_zone_shared: rule:owner_or_zone_shared or rule:admin
dns_admin: role:dns_admin and rule:owner

member: role:member and rule:owner
member_and_shared: role:member and rule:owner_or_zone_shared

viewer: role:dns_viewer and rule:owner
viewer_and_shared: role:dns_viewer and rule:owner_or_zone_shared
cloud_dns_viewer: role:cloud_dns_viewer

context_is_cloud_admin: role:cloud_dns_admin
context_is_dns_ops: rule:context_is_cloud_admin or role:cloud_dns_ops or rule:admin
context_is_dns_support: rule:context_is_dns_ops or role:cloud_dns_support
context_is_zonemaster: rule:context_is_dns_support or (role:dns_zonemaster and rule:owner)
context_is_hostmaster: rule:context_is_dns_support or (role:dns_hostmaster and rule:owner)
context_is_mailmaster: rule:context_is_dns_support or (role:dns_mailmaster and rule:owner)
context_is_webmaster: rule:context_is_dns_support or rule:context_is_mailmaster or rule:context_is_hostmaster or (role:dns_webmaster and rule:owner)
context_is_editor: rule:dns_admin or rule:member or rule:admin
context_is_viewer: rule:viewer_and_shared or rule:member_and_shared or rule:context_is_master or rule:context_is_editor or rule:viewer or rule:member or rule:cloud_dns_viewer
context_is_master: rule:context_is_dns_support or rule:context_is_zonemaster or rule:context_is_hostmaster or rule:context_is_mailmaster or rule:context_is_webmaster or rule:context_is_editor

zone_primary_or_dns_ops: "('PRIMARY':%(zone_type)s and rule:context_is_dns_ops) or ('SECONDARY':%(zone_type)s and is_admin:True)"

default: rule:context_is_viewer
all_tenants: rule:context_is_dns_support or rule:cloud_dns_viewer
edit_managed_records: rule:context_is_master
use_low_ttl: rule:context_is_dns_support
get_quotas: rule:context_is_viewer
get_quota: rule:context_is_viewer
set_quota: rule:admin
reset_quotas: rule:admin
create_tld: rule:admin
find_tlds: rule:admin
get_tld: rule:admin
update_tld: rule:admin
delete_tld: rule:admin
create_tsigkey: rule:admin
find_tsigkeys: rule:admin
get_tsigkey: rule:admin
update_tsigkey: rule:admin
delete_tsigkey: rule:admin
find_tenants: rule:admin or rule:context_is_dns_ops
get_tenant: rule:admin or rule:context_is_dns_ops
count_tenants: rule:admin or rule:context_is_dns_ops
share_zone: rule:context_is_master
unshare_zone: rule:context_is_master
create_zone: rule:context_is_dns_ops
move_zone: rule:context_is_dns_ops
create_sub_zone: rule:context_is_zonemaster
create_super_zone: rule:context_is_cloud_admin
get_zones: rule:context_is_viewer
get_zone: rule:context_is_viewer
get_shared_zone: rule:context_is_viewer
get_zone_servers: rule:context_is_viewer
find_zones: rule:context_is_viewer
find_zone: rule:context_is_viewer
find_shared_zones: rule:context_is_viewer
update_zone: rule:context_is_master
update_sub_zone: rule:context_is_master
delete_zone: rule:context_is_master
xfr_zone: rule:context_is_master
abandon_zone: rule:context_is_dns_ops
count_zones: rule:context_is_viewer
count_zones_pending_notify: rule:context_is_viewer
{'fraction_non_alphanumeric': 0.06495061358874589, 'fraction_numerical': 0.0, 'mean_word_length': 13.591703056768559, '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': '13360', 'n_tokens_mistral': 2471, 'n_tokens_neox': 2479, 'n_words': 439}