Method: users.getCapabilities

取得使用者權限。

HTTP 要求

GET https://drivelabels.googleapis.com/v2beta/{name=users/*/capabilities}

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
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

詳情請參閱授權指南