Zoho WorkDrive - Disable Button/Folder

Zoho WorkDrive - Disable Button/Folder

I have been able to successfully  make use of the Share Files/Folders to everyone on the Internet API request.

I took the link generated and placed it in an iframe.

It shows the relevant folder however that folder is within another folder or is nested.

So the folder that is loaded inside the iframe is for example labelled 'Customer Brand Perception' but that folder is within another folder/nested in another folder labelled 'NCB'. 

I don't want the user to be able to click on the NCB folder and go upwards/see what's inside that folder. 

I'd like for the user to not be able to click on it or be able to see the contents inside the NCB folder.





  1. <?php

    include("zoho-work-drive-refresh-token.php");

    $department_brand_folders = [

        'Customer Brand Perception' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
        'Lorem Ipsum' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

    ];


    if (array_key_exists('Customer Brand Perception', $department_brand_folders)) {

        $resource_id = $department_brand_folders['Customer Brand Perception'];
       
        $token = $value["access_token"];

        $postFields = array(
                                'data' => array(
                                    'attributes' => array(
                                        'resource_id' => $resource_id,
                                        'shared_type' =>  "publish",
                                        'role_id' => "6"
                                        ),
                                    'type' => "permissions"  
                                )
                        );
                       
        $data_to_post = json_encode($postFields);
        $curl_variable = curl_init();
        curl_setopt($curl_variable, CURLOPT_URL, $curl_url);
        curl_setopt($curl_variable, CURLOPT_POST, 1);
        curl_setopt($curl_variable, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl_variable, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($curl_variable, CURLOPT_POSTFIELDS, $data_to_post);
        curl_setopt($curl_variable, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $token, 'cache-control: no-cache'));

        $response = curl_exec($curl_variable);

        $err = curl_error($curl_variable);
        if ($err) {
            echo "cURL Error #:" . $err;
        } else{
            $data = json_decode($response,true);
            $link = $data['data']['attributes']['permalink'];
        }


    } else{
        echo '<br>';
        echo '<pre>';
        echo "ERROR";
    }




    ?>

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Document</title>
        <style type="text/css">
                body, html
                {
                    margin: 0; padding: 0; height: 100%; overflow: hidden;
                }

                #content
                {
                    position:absolute; left: 0; right: 0; bottom: 0; top: 0px;
                }
            </style>
    </head>
    <body>

        <div id="content">

             <iframe width="100%" height="100%" frameborder="0" src=<?php echo $link ?>></iframe>
        </div>    

    </body>
    </html>


How can I achieve this? Is this possible?






                            Zoho Desk Resources

                            • Desk Community Learning Series


                            • Digest


                            • Functions


                            • Meetups


                            • Kbase


                            • Resources


                            • Glossary


                            • Desk Marketplace


                            • MVP Corner


                            • Word of the Day



                                Zoho Marketing Automation


                                        Manage your brands on social media



                                              Zoho TeamInbox Resources

                                                Zoho DataPrep Resources



                                                  Zoho CRM Plus Resources

                                                    Zoho Books Resources


                                                      Zoho Subscriptions Resources

                                                        Zoho Projects Resources


                                                          Zoho Sprints Resources


                                                            Qntrl Resources


                                                              Zoho Creator Resources


                                                                Zoho WorkDrive Resources



                                                                  Zoho Campaigns Resources

                                                                    Zoho CRM Resources

                                                                    • CRM Community Learning Series

                                                                      CRM Community Learning Series


                                                                    • Tips

                                                                      Tips

                                                                    • Functions

                                                                      Functions

                                                                    • Meetups

                                                                      Meetups

                                                                    • Kbase

                                                                      Kbase

                                                                    • Resources

                                                                      Resources

                                                                    • Digest

                                                                      Digest

                                                                    • CRM Marketplace

                                                                      CRM Marketplace

                                                                    • MVP Corner

                                                                      MVP Corner

                                                                    





                                                                    




                                                                        Design. Discuss. Deliver.

                                                                        Create visually engaging stories with Zoho Show.

                                                                        Get Started Now