REST Resource: labels.permissions
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
משאב: LabelPermission
ההרשאה שחלה על גורם (משתמש, קבוצה, קהל) בתווית.
ייצוג ב-JSON |
{
"name": string,
"email": string,
"role": enum (LabelRole ),
// Union field principal can be only one of the following:
"person": string,
"group": string,
"audience": string
// End of list of possible types for union field principal .
} |
שדות |
name |
string
שם המשאב של ההרשאה הזו.
|
email |
string
מציינת את כתובת האימייל של חשבון משתמש או קבוצה. לא מאוכלס עבור ישויות קהל. אפשר להוסיף הרשאות למשתמשים ולקבוצות רק באמצעות כתובת אימייל. בבקשות עדכון, אם מציינים כתובת אימייל, אסור לציין גורם מרכזי.
|
role |
enum (LabelRole )
התפקיד שצריך להיות לחשבון המשתמש.
|
שדה איחוד principal . חשבון המשתמש שההרשאה חלה עליו. הנמען חייב להיות כתובת אימייל, משתמש, קבוצה או קהל. דוגמה: * people/12345 * groups/45678 * audiences/default principal יכול להיות רק אחת מהאפשרויות הבאות: |
person |
string
שם המשאב של האדם.
|
group |
string
שם המשאב של הקבוצה.
|
audience |
string
קהל שרוצים לתת לו תפקיד. אפשר להשתמש בערך הקסם audiences/default כדי להחיל את התפקיד על קהל ברירת המחדל בהקשר של הארגון שהוא הבעלים של התווית.
|
LabelRole
התפקידים הם קונצנטריים עם התפקיד הבא.
טיפוסים בני מנייה (enum) |
LABEL_ROLE_UNSPECIFIED |
תפקיד לא ידוע. |
READER |
משתמש עם הרשאת קריאה יכול לקרוא את התווית ואת המטא-נתונים המשויכים שהוחלו על פריטים ב-Drive. |
APPLIER |
משתמש שמחיל תיוג יכול לכתוב מטא-נתונים משויכים בפריטים ב-Drive שיש לו גם הרשאת כתיבה לגביהם. המשמעות היא READER . |
ORGANIZER |
בעלי הרשאת ארגון יכולים להצמיד את התווית הזו לתיקיות אחסון שיתופי שהם מנהלים ולהוסיף לתווית משתמשים חדשים עם הרשאת החלה. |
EDITOR |
עורכים יכולים לבצע כל עדכון, כולל מחיקת התווית, שגורמת גם למחיקת המטא-נתונים של הפריט המשויך ב-Drive. המשמעות היא APPLIER . |
Methods |
|
מחיקת הרשאות לתווית. |
|
מעדכן את הרשאות התווית. |
|
עדכון ההרשאות של תווית. |
|
מחיקת הרשאה של תווית. |
|
הפונקציה מחזירה את ההרשאות של התווית. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-05 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-05 (שעון UTC)."],[],[],null,["# REST Resource: labels.permissions\n\n- [Resource: LabelPermission](#LabelPermission)\n - [JSON representation](#LabelPermission.SCHEMA_REPRESENTATION)\n - [LabelRole](#LabelPermission.LabelRole)\n- [Methods](#METHODS_SUMMARY)\n\nResource: LabelPermission\n-------------------------\n\nThe permission that applies to a principal (user, group, audience) on a label.\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"email\": string, \"role\": enum (/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole), // Union field `principal` can be only one of the following: \"person\": string, \"group\": string, \"audience\": string // End of list of possible types for union field `principal`. } ``` |\n\n| Fields ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Resource name of this permission. |\n| `email` | `string` Specifies the email address for a user or group principal. Not populated for audience principals. User and group permissions may only be inserted using an email address. On update requests, if email address is specified, no principal should be specified. |\n| `role` | `enum (`[LabelRole](/workspace/drive/labels/reference/rest/v2/labels.permissions#LabelPermission.LabelRole)`)` The role the principal should have. |\n| Union field `principal`. The principal this permission applies to. Must be either an email, user, group, or audience. Example: \\* `people/12345` \\* `groups/45678` \\* `audiences/default` `principal` can be only one of the following: ||\n| `person` | `string` Person resource name. |\n| `group` | `string` Group resource name. |\n| `audience` | `string` Audience to grant a role to. The magic value of `audiences/default` may be used to apply the role to the default audience in the context of the organization that owns the label. |\n\n### LabelRole\n\nRoles are concentric with subsequent role.\n\n| Enums ||\n|--------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| `LABEL_ROLE_UNSPECIFIED` | Unknown role. |\n| `READER` | A reader can read the label and associated metadata applied to Drive items. |\n| `APPLIER` | An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`. |\n| `ORGANIZER` | An organizer can pin this label in shared drives they manage and add new appliers to the label. |\n| `EDITOR` | Editors can make any update including deleting the label which also deletes the associated Drive item metadata. Implies `APPLIER`. |\n\n| Methods ------- ||\n|---------------------------------------------------------------------------------------------|--------------------------------|\n| ### [batchDelete](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchDelete) | Deletes label permissions. |\n| ### [batchUpdate](/workspace/drive/labels/reference/rest/v2/labels.permissions/batchUpdate) | Updates label permissions. |\n| ### [create](/workspace/drive/labels/reference/rest/v2/labels.permissions/create) | Updates a label's permissions. |\n| ### [delete](/workspace/drive/labels/reference/rest/v2/labels.permissions/delete) | Deletes a label's permission. |\n| ### [list](/workspace/drive/labels/reference/rest/v2/labels.permissions/list) | Lists a label's permissions. |"]]