با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
دسترسی داشته باشید
فهرستی که نشاندهنده دستههایی از کاربرانی است که میتوانند به یک فایل یا پوشه دسترسی داشته باشند، علاوه بر هر کاربر فردی که صراحتاً به آنها دسترسی داده شده است. از Drive App.Access میتوان به این ویژگیها دسترسی داشت.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، 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.)constfolder=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
فقط افرادی که صراحتاً مجوز دارند می توانند دسترسی داشته باشند. ورود به سیستم الزامی است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]