Method: users.getCapabilities
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
الحصول على إمكانات المستخدم
طلب HTTP
GET https://drivelabels.googleapis.com/v2beta/{name=users/*/capabilities}
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
name |
string
مطلوب. اسم مورد المستخدم. لا يمكن استخدام سوى "users/me/capabilities".
|
مَعلمات طلب البحث
المعلمات |
customer |
string
العميل الذي يتم تحديد نطاق هذا الطلب له على سبيل المثال: "customers/abcd1234". في حال عدم ضبطها، سيتم عرض الإعدادات ضمن العميل الحالي.
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إمكانات المستخدِم
إذا كانت الاستجابة ناجحة، سيحتوي نص الاستجابة على بيانات بالبنية التالية:
تمثيل JSON |
{
"name": string,
"canAccessLabelManager": boolean,
"canAdministrateLabels": boolean,
"canCreateSharedLabels": boolean,
"canCreateAdminLabels": boolean
} |
الحقول |
name |
string
النتائج فقط. اسم المورد لإمكانات المستخدم
|
canAccessLabelManager |
boolean
النتائج فقط. ما إذا كان يُسمح للمستخدم بالوصول إلى أداة إدارة التصنيفات
|
canAdministrateLabels |
boolean
النتائج فقط. ما إذا كان المستخدم مشرفًا لميزة "التصنيفات المشتركة"
|
canCreateSharedLabels |
boolean
النتائج فقط. ما إذا كان يُسمح للمستخدم بإنشاء تصنيفات مشترَكة جديدة
|
canCreateAdminLabels |
boolean
النتائج فقط. ما إذا كان يُسمح للمستخدم بإنشاء تصنيفات جديدة للمشرفين
|
نطاقات التفويض
يتطلب أحد نطاقات OAuth التالية:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.labels.readonly
https://www.googleapis.com/auth/drive.admin.labels
https://www.googleapis.com/auth/drive.admin.labels.readonly
لمزيد من المعلومات، يمكنك الاطّلاع على دليل التفويض.
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Method: users.getCapabilities\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.UserCapabilities.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGets the user capabilities.\n\n### HTTP request\n\n`GET https://drivelabels.googleapis.com/v2beta/{name=users/*/capabilities}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|----------------------------------------------------------------------------------------------|\n| `name` | `string` Required. The resource name of the user. Only \"users/me/capabilities\" is supported. |\n\n### Query parameters\n\n| Parameters ||\n|------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `customer` | `string` The customer to scope this request to. For example: \"customers/abcd1234\". If unset, will return settings within the current customer. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nThe capabilities of a user.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"canAccessLabelManager\": boolean, \"canAdministrateLabels\": boolean, \"canCreateSharedLabels\": boolean, \"canCreateAdminLabels\": boolean } ``` |\n\n| Fields ||\n|-------------------------|--------------------------------------------------------------------------------------------|\n| `name` | `string` Output only. Resource name for the user capabilities. |\n| `canAccessLabelManager` | `boolean` Output only. Whether the user is allowed access to the label manager. |\n| `canAdministrateLabels` | `boolean` Output only. Whether the user is an administrator for the shared labels feature. |\n| `canCreateSharedLabels` | `boolean` Output only. Whether the user is allowed to create new shared labels. |\n| `canCreateAdminLabels` | `boolean` Output only. Whether the user is allowed to create new admin labels. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive.labels`\n- `\n https://www.googleapis.com/auth/drive.labels.readonly`\n- `\n https://www.googleapis.com/auth/drive.admin.labels`\n- `\n https://www.googleapis.com/auth/drive.admin.labels.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]