================================================================================
AccessByPermission property in action declarations
================================================================================

page 123 "Test Page"
{
    actions
    {
        action(TestAction)
        {
            ApplicationArea = All;
            AccessByPermission = tabledata Customer = R;
            Caption = 'Test Action';
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (actions_section
      (actions_keyword)
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (identifier))
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type))))
        (property
          name: (property_name)
          value: (string_literal))))))

================================================================================
AccessByPermission property with quoted table name
================================================================================

page 124 "Test Page"
{
    actions
    {
        action(TestAction)
        {
            ApplicationArea = All;
            AccessByPermission = tabledata "Sales Header" = RM;
            Caption = 'Test Action';
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (actions_section
      (actions_keyword)
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (identifier))
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (quoted_identifier)
              permission: (permission_type))))
        (property
          name: (property_name)
          value: (string_literal))))))

================================================================================
AccessByPermission property in field sections
================================================================================

page 125 "Test Page"
{
    layout
    {
        area(content)
        {
            field(TestField; SomeValue)
            {
                ApplicationArea = All;
                AccessByPermission = tabledata "Purchase Header" = R;
                Caption = 'Test Field';
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (layout_section
      (layout_keyword)
      (area_section
        (area_keyword)
        (page_field
          name: (identifier)
          source: (identifier)
          (property
            name: (property_name)
            value: (identifier))
          (property
            name: (property_name)
            value: (tabledata_permission_list
              (tabledata_permission
                table_name: (quoted_identifier)
                permission: (permission_type))))
          (property
            name: (property_name)
            value: (string_literal)))))))

================================================================================
AccessByPermission property with different permission types
================================================================================

page 126 "Test Page"
{
    actions
    {
        action(ReadAction)
        {
            AccessByPermission = tabledata Customer = R;
        }
        action(ModifyAction)
        {
            AccessByPermission = tabledata Customer = M;
        }
        action(InsertAction)
        {
            AccessByPermission = tabledata Customer = I;
        }
        action(DeleteAction)
        {
            AccessByPermission = tabledata Customer = D;
        }
        action(ReadModifyAction)
        {
            AccessByPermission = tabledata Customer = RM;
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (page_declaration
    (page_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (actions_section
      (actions_keyword)
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type)))))
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type)))))
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type)))))
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type)))))
      (action_declaration
        name: (identifier)
        (property
          name: (property_name)
          value: (tabledata_permission_list
            (tabledata_permission
              table_name: (identifier)
              permission: (permission_type))))))))
