Enum Permission
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
권한
명시적으로 액세스 권한이 부여된 개별 사용자 외에도 파일 또는 폴더에 액세스할 수 있는 사용자에게 부여된 권한을 나타내는 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.)
const folder = DriveApp.createFolder('Shared Folder');
folder.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);
속성
속성 | 유형 | 설명 |
VIEW | Enum | 파일 또는 폴더에 액세스할 수 있는 사용자는 파일을 보거나 복사할 수만 있습니다. 이 값을 File.setSharing(accessType, permissionType) 에 전달하면 파일 유형이 이를 지원하지 않는 경우 예외가 발생합니다. |
EDIT | Enum | 파일 또는 폴더에 액세스할 수 있는 사용자는 파일을 수정할 수 있습니다. File.setShareableByEditors(shareable) 가 false 로 설정되어 있지 않으면 사용자는 공유 설정을 변경할 수도 있습니다. 이 값을 File.setSharing(accessType, permissionType) 에 전달하면 파일 유형에서 지원하지 않는 경우 예외가 발생합니다. |
COMMENT | Enum | 파일 또는 폴더에 액세스할 수 있는 사용자는 파일을 보거나, 복사하거나, 댓글을 달 수만 있습니다.
이 값을 File.setSharing(accessType, permissionType) 에 전달하면 파일 유형이 이를 지원하지 않는 경우 예외가 발생합니다. |
OWNER | Enum | 사용자가 파일 또는 폴더를 소유하고 있습니다. 이 값은 반환할 수 있지만 File.setSharing(accessType, permissionType) 에 전달하면 예외가 발생합니다. |
ORGANIZER | Enum | 공유 드라이브 내에서 파일 및 폴더를 정리할 수 있는 사용자입니다. 이 값은 반환할 수 있지만 File.setSharing(accessType, permissionType) 에 전달하면 예외가 발생합니다. |
FILE_ORGANIZER | Enum | 공유 드라이브 내에서 콘텐츠를 수정, 휴지통에 추가, 이동할 수 있는 사용자입니다. 이 값은 반환할 수 있지만 File.setSharing(accessType, permissionType) 에 전달하면 예외가 발생합니다. |
NONE | Enum | 사용자에게 파일 또는 폴더에 대한 권한이 없습니다. 이 값은 반환할 수 있지만 Access.ANYONE 와 함께 설정되지 않는 한 File.setSharing(accessType, permissionType) 에 전달하면 예외가 발생합니다. |
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003e\u003ccode\u003eDriveApp.Permission\u003c/code\u003e is an enum that represents the permissions granted to users for accessing files or folders, in addition to individually assigned permissions.\u003c/p\u003e\n"],["\u003cp\u003eYou can use \u003ccode\u003eDriveApp.Permission\u003c/code\u003e properties like \u003ccode\u003eVIEW\u003c/code\u003e, \u003ccode\u003eEDIT\u003c/code\u003e, \u003ccode\u003eCOMMENT\u003c/code\u003e, etc. to define access levels when setting sharing settings for files or folders.\u003c/p\u003e\n"],["\u003cp\u003eCalling an enum property involves using the parent class, name, and property, such as \u003ccode\u003eDriveApp.Permission.VIEW\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhile some properties like \u003ccode\u003eOWNER\u003c/code\u003e, \u003ccode\u003eORGANIZER\u003c/code\u003e, \u003ccode\u003eFILE_ORGANIZER\u003c/code\u003e, and \u003ccode\u003eNONE\u003c/code\u003e can be returned, they cannot be used to set sharing permissions and will throw an exception.\u003c/p\u003e\n"]]],["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"],null,["# Enum Permission\n\nPermission\n\nAn enum representing the permissions granted to users who can access a file or folder, besides\nany individual users who have been explicitly given access. These properties can be accessed from\n[DriveApp.Permission](/apps-script/reference/drive/drive-app#Permission).\n\nTo call an enum, you call its parent class, name, and property. For example, `\nDriveApp.Permission.VIEW`.\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 Google Workspace users.)\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| `VIEW` | `Enum` | Users who can access the file or folder are able only to view it or copy it. Passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception if the type of file does not support it. |\n| `EDIT` | `Enum` | Users who can access the file or folder are able to edit it. Unless [File.setShareableByEditors(shareable)](/apps-script/reference/drive/file#setShareableByEditors(Boolean)) is set to `false`, users can also change the sharing settings. Passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception if the type of file does not support it. |\n| `COMMENT` | `Enum` | Users who can access the file or folder are able only to view it, copy it, or comment on it. Passing this value to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception if the type of file does not support it. |\n| `OWNER` | `Enum` | The user owns the file or folder. This value can be returned, but passing it to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `ORGANIZER` | `Enum` | Users who can organize files and folders within a shared drive. This value can be returned, but passing it to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `FILE_ORGANIZER` | `Enum` | Users who can edit, trash, and move content within a shared drive. This value can be returned, but passing it to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception. |\n| `NONE` | `Enum` | The user does not have any permissions for the file or folder. This value can be returned, but passing it to [File.setSharing(accessType, permissionType)](/apps-script/reference/drive/file#setSharing(Access,Permission)) throws an exception unless it is set in combination with [Access.ANYONE](/apps-script/reference/drive/access#ANYONE). |"]]