קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
הרשאה
enum שמייצג את ההרשאות שהוקצו למשתמשים שיש להם גישה לקובץ או לתיקייה, מלבד משתמשים ספציפיים שקיבלו גישה באופן מפורש. אפשר לגשת לנכסים האלה דרך DriveApp.Permission.
כדי לקרוא למאפיין enum, צריך לקרוא לכיתה ההורה, לשם ולנכס שלו. לדוגמה,
DriveApp.Permission.VIEW.
// Creates a folder that anyone on the Internet can read from and write to.// (Domain administrators can prohibit this setting for Google Workspace users.)constfolder=DriveApp.createFolder('Shared Folder');folder.setSharing(DriveApp.Access.ANYONE,DriveApp.Permission.EDIT);
מאפיינים
נכס
סוג
תיאור
VIEW
Enum
משתמשים שיש להם גישה לקובץ או לתיקייה יכולים רק להציג או להעתיק אותם. העברת הערך הזה ל-File.setSharing(accessType, permissionType) תגרום להשלכת חריגה אם סוג הקובץ לא תומך בו.
משתמשים שיש להם גישה לקובץ או לתיקייה יכולים רק להציג אותם, להעתיק אותם או להגיב עליהם.
העברת הערך הזה ל-File.setSharing(accessType, permissionType) תגרום להשלכת חריגה אם סוג הקובץ לא תומך בו.
[[["התוכן קל להבנה","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"]],["עדכון אחרון: 2024-12-22 (שעון UTC)."],[[["`DriveApp.Permission` is an enum that represents the permissions granted to users for accessing files or folders, in addition to individually assigned permissions."],["You can use `DriveApp.Permission` properties like `VIEW`, `EDIT`, `COMMENT`, etc. to define access levels when setting sharing settings for files or folders."],["Calling an enum property involves using the parent class, name, and property, such as `DriveApp.Permission.VIEW`."],["While some properties like `OWNER`, `ORGANIZER`, `FILE_ORGANIZER`, and `NONE` can be returned, they cannot be used to set sharing permissions and will throw an exception."]]],["The `Permission` enum in DriveApp defines user access levels for files/folders. Key permissions include `VIEW` (view/copy), `EDIT` (edit, potentially share), and `COMMENT` (view, copy, comment). `OWNER`, `ORGANIZER`, and `FILE_ORGANIZER` are for ownership and shared drive organization. `NONE` indicates no permissions. `setSharing()` can define these permissions using `DriveApp.Permission.ENUM_NAME`, except for `OWNER`, `ORGANIZER`, `FILE_ORGANIZER`, and sometimes `NONE`. The `setSharing` method also accepts an `Access` type to define who these permissions apply to.\n"]]