Enum Access
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ऐक्सेस करना
यह एक सूची है, जिसमें उन उपयोगकर्ताओं की कैटगरी शामिल होती है जो किसी फ़ाइल या फ़ोल्डर को ऐक्सेस कर सकते हैं. इसमें उन उपयोगकर्ताओं के अलावा, वे उपयोगकर्ता भी शामिल होते हैं जिन्हें साफ़ तौर पर ऐक्सेस दिया गया है. इन प्रॉपर्टी को DriveApp.Access
से ऐक्सेस किया जा सकता है.
किसी एनम को कॉल करने के लिए, उसकी पैरंट क्लास, नाम, और प्रॉपर्टी को कॉल किया जाता है. उदाहरण के लिए,
DriveApp.Access.ANYONE
.
// Creates a folder that anyone on the Internet can read from and write to.
// (Domain administrators can prohibit this setting for users of a Google
// Workspace domain.)
const folder = DriveApp.createFolder('Shared Folder');
folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
प्रॉपर्टी
प्रॉपर्टी | टाइप | ब्यौरा |
ANYONE | Enum | इंटरनेट पर मौजूद कोई भी व्यक्ति इसे ढूंढ सकता है और ऐक्सेस कर सकता है. साइन इन करने की ज़रूरत नहीं है.
डोमेन एडमिन, Google Workspace डोमेन के उपयोगकर्ताओं के लिए इस सेटिंग पर पाबंदी लगा सकते हैं. अगर सेटिंग बंद है, तो File.setSharing(accessType, permissionType) को यह वैल्यू देने पर अपवाद दिखता है.
|
ANYONE_WITH_LINK | Enum | जिस भी व्यक्ति के पास लिंक है वह इसे ऐक्सेस कर सकता है. साइन इन करने की ज़रूरत नहीं है.
डोमेन एडमिन, Google Workspace डोमेन के उपयोगकर्ताओं के लिए इस सेटिंग पर पाबंदी लगा सकते हैं. अगर सेटिंग बंद है, तो File.setSharing(accessType, permissionType) को यह वैल्यू देने पर अपवाद दिखता है.
|
DOMAIN | Enum | आपके डोमेन में शामिल लोग, इसे ढूंढकर ऐक्सेस कर सकते हैं. साइन-इन आवश्यक है.
यह सेटिंग, सिर्फ़ Google Workspace डोमेन के उपयोगकर्ताओं के लिए उपलब्ध है. अन्य तरह के Google खातों के लिए, File.setSharing(accessType, permissionType) को यह वैल्यू देने पर अपवाद दिखता है.
|
DOMAIN_WITH_LINK | Enum | आपके डोमेन के वे लोग जिनके पास लिंक है, वे ऐक्सेस कर सकते हैं. साइन-इन आवश्यक है.
यह सेटिंग, सिर्फ़ Google Workspace डोमेन के उपयोगकर्ताओं के लिए उपलब्ध है. अन्य तरह के Google खातों के लिए, File.setSharing(accessType, permissionType) को यह वैल्यू देने पर अपवाद दिखता है.
|
PRIVATE | Enum | केवल स्पष्ट अनुमति वाले लोग ही अभिगमन कर सकते हैं. साइन-इन आवश्यक है. |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[[["\u003cp\u003e\u003ccode\u003eDriveApp.Access\u003c/code\u003e is an enum used to define user access levels for files and folders in Google Drive, beyond individual permissions.\u003c/p\u003e\n"],["\u003cp\u003eYou can set file or folder sharing permissions using methods like \u003ccode\u003esetSharing()\u003c/code\u003e along with the \u003ccode\u003eDriveApp.Access\u003c/code\u003e and \u003ccode\u003eDriveApp.Permission\u003c/code\u003e enums.\u003c/p\u003e\n"],["\u003cp\u003eSeveral access levels are available: \u003ccode\u003eANYONE\u003c/code\u003e, \u003ccode\u003eANYONE_WITH_LINK\u003c/code\u003e, \u003ccode\u003eDOMAIN\u003c/code\u003e, \u003ccode\u003eDOMAIN_WITH_LINK\u003c/code\u003e, and \u003ccode\u003ePRIVATE\u003c/code\u003e, each controlling who can access the content.\u003c/p\u003e\n"],["\u003cp\u003eDomain administrators in Google Workspace can restrict the use of \u003ccode\u003eANYONE\u003c/code\u003e and \u003ccode\u003eANYONE_WITH_LINK\u003c/code\u003e sharing options for their users.\u003c/p\u003e\n"]]],[],null,["# Enum Access\n\nAccess\n\nAn enum representing classes of users who can access a file or folder, besides any individual\nusers who have been explicitly given access. These properties can be accessed from [DriveApp.Access](/apps-script/reference/drive/drive-app#Access).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nDriveApp.Access.ANYONE`.\n\n```javascript\n// Creates a folder that anyone on the Internet can read from and write to.\n// (Domain administrators can prohibit this setting for users of a Google\n// Workspace domain.)\nconst folder = DriveApp.createFolder('Shared Folder');\nfolder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);\n``` \n\n### Properties\n\n| Property | Type | Description |\n|--------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ANYONE` | `Enum` | Anyone on the Internet can find and access. No sign-in required. Domain administrators can prohibit this setting for users of a Google Workspace domain. If the setting is disabled, passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `ANYONE_WITH_LINK` | `Enum` | Anyone who has the link can access. No sign-in required. Domain administrators can prohibit this setting for users of a Google Workspace domain. If the setting is disabled, passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `DOMAIN` | `Enum` | People in your domain can find and access. Sign-in required. This setting is available only for users of a Google Workspace domain. For other types of Google accounts, passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `DOMAIN_WITH_LINK` | `Enum` | People in your domain who have the link can access. Sign-in required. This setting is available only for users of a Google Workspace domain. For other types of Google accounts, passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `PRIVATE` | `Enum` | Only people explicitly granted permission can access. Sign-in required. |"]]