Method: users.getCapabilities
قابلیت های کاربر را دریافت می کند.
درخواست HTTP
GET https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string مورد نیاز. نام منبع کاربر فقط "کاربران/من/قابلیت ها" پشتیبانی می شود. |
پارامترهای پرس و جو
پارامترها |
---|
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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-13 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-13 بهوقت ساعت هماهنگ جهانی."],[[["This API retrieves the capabilities of a user, such as whether they can access the label manager, administrate labels, or create shared or admin labels."],["It uses a GET request with the URL `https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}` and requires the user's resource name in the path parameters."],["You can optionally scope the request to a specific customer using the `customer` query parameter."],["The response body contains a JSON object outlining the user's capabilities, including access permissions and administrative privileges for labels."],["Authorization is required using one of the specified OAuth scopes, including `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.labels.readonly`."]]],["This describes retrieving user capabilities via a `GET` request to `https://drivelabels.googleapis.com/v2/{name=users/*/capabilities}`. The required path parameter `name` must be \"users/me/capabilities\". An optional `customer` query parameter scopes the request. The request body is empty. The JSON response details user abilities, like `canAccessLabelManager`, and whether they can create admin or shared labels. One of the provided authorization scopes is required.\n"]]