Google Classroom eklentileri artık geliştiricilerin genel kullanımına sunuldu! Daha fazla bilgi edinmek için lütfen
eklenti belgelerini inceleyin.
Method: userProfiles.checkUserCapability
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Kullanıcının belirtilen Classroom özelliğini kullanıp kullanamayacağını döndürür. Örneğin, bu uç nokta, kullanıcının eklenti ekleri oluşturup oluşturamayacağını kontrol etmek için kullanılabilir.İstek gönderen kullanıcı yalnızca kendi özelliklerini kontrol edebilir.
Bu yöntem aşağıdaki hata kodlarını döndürür:
PERMISSION_DENIED
İstekte bulunan kullanıcının, belirtilen kullanıcının uygunluğunu kontrol etmesine izin verilmiyorsa.
- İstek yanlış biçimlendirilmişse
INVALID_ARGUMENT
.
HTTP isteği
GET https://classroom.googleapis.com/v1/userProfiles/{userId}:checkUserCapability
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
userId |
string
Zorunlu. Kullanıcının tanımlayıcısı. Bir isteğin parametresi olarak belirtildiğinde bu tanımlayıcı aşağıdakilerden biri olabilir:
- Kullanıcının sayısal tanımlayıcısı
- Kullanıcının e-posta adresi
- İstekte bulunan kullanıcıyı belirten
"me" dize değişmezi
|
Sorgu parametreleri
Parametreler |
capability |
enum (Capability )
Zorunlu. Bu kullanıcı için kontrol edilmesi gereken özellik. Örneğin, bir kullanıcının eklenti eki oluşturup oluşturamayacağını kontrol etmek için bu değeri CREATE_ADD_ON_ATTACHMENT olarak ayarlayın.
|
previewVersion |
enum (PreviewVersion )
İsteğe bağlı. API'nin önizleme sürümü.
|
İstek içeriği
İstek metni boş olmalıdır.
Yanıt gövdesi
Kullanıcı özelliklerini kontrol etme işleminden alınan yanıt.
Başarılı olursa yanıt metni aşağıdaki yapıyla birlikte verileri içerir:
JSON gösterimi |
{
"capability": enum (Capability ),
"allowed": boolean
} |
Alanlar |
capability |
enum (Capability )
Classroom özelliği.
|
allowed |
boolean
Belirtilen özelliğin kullanıcıya izin verilip verilmediği.
|
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamlarından birini gerektirir:
https://www.googleapis.com/auth/classroom.courses
https://www.googleapis.com/auth/classroom.courses.readonly
Daha fazla bilgi için Yetkilendirme kılavuzu'na bakın.
Kapasite
Özelliği temsil eden enum.
Sıralamalar |
CAPABILITY_UNSPECIFIED |
Desteklenmiyor. |
CREATE_ADD_ON_ATTACHMENT |
İsteği yapmak için kullanılan OAuth istemci kimliğinin Developer Console projesiyle ilişkili AddOnAttachment'ları oluşturma ve değiştirme özelliği. |
CREATE_RUBRIC |
Derecelendirme ölçekleri oluşturma ve değiştirme özelliği. |
UPDATE_GRADING_PERIOD_SETTINGS |
Notlandırma dönemi ayarlarını değiştirme özelliği. |
CREATE_STUDENT_GROUP |
Öğrenci grupları ve üyelerini oluşturma ve değiştirme özelliği. |
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-06 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-06 UTC."],[],[],null,["# Method: userProfiles.checkUserCapability\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.CheckUserCapabilityResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Capability](#Capability)\n\n\u003cbr /\u003e\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. This feature is available in [V1_20240930_PREVIEW](https://developers.google.com/workspace/classroom/reference/rest/v1/PreviewVersion) and later. See [Access Preview APIs](https://developers.google.com/workspace/classroom/reference/preview) to learn more.\nReturns whether a user may use the specified Classroom capability. For example, this endpoint can be used to check whether a user may create add- on attachments.\n\n\u003cbr /\u003e\n\nA requesting user can only check capabilities for themselves.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to check eligibility for the specified user.\n- `INVALID_ARGUMENT` if the request is malformed.\n\n### HTTP request\n\n`GET https://classroom.googleapis.com/v1/userProfiles/{userId}:checkUserCapability`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `userId` | `string` Required. Identifier of the user. When specified as a parameter of a request, this identifier can be one of the following: - the numeric identifier for the user - the email address of the user - the string literal `\"me\"`, indicating the requesting user |\n\n### Query parameters\n\n| Parameters ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `capability` | `enum (`[Capability](/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability)`)` Required. The Capability that should be checked for this user. For example, to check whether a user can create an [add-on attachment](https://developers.google.com/workspace/classroom/reference/rest/v1/courses.courseWork.addOnAttachments#resource:-addonattachment), set this to `CREATE_ADD_ON_ATTACHMENT`. |\n| `previewVersion` | `enum (`[PreviewVersion](/workspace/classroom/reference/rest/v1/PreviewVersion)`)` Optional. The preview version of the API. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse from checking user capabilities.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"capability\": enum (/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability), \"allowed\": boolean } ``` |\n\n| Fields ||\n|--------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| `capability` | `enum (`[Capability](/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability#Capability)`)` The Classroom capability. |\n| `allowed` | `boolean` Whether the specified capability is allowed for the user. |\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/classroom.courses`\n- `\n https://www.googleapis.com/auth/classroom.courses.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent).\n\nCapability\n----------\n\nEnum to represent the capability.\n\n| Enums ||\n|----------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `CAPABILITY_UNSPECIFIED` | Not supported. |\n| `CREATE_ADD_ON_ATTACHMENT` | The capability to create and modify AddOnAttachments associated with the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to make the request. |\n| `CREATE_RUBRIC` | The capability to create and modify Rubrics. |\n| `UPDATE_GRADING_PERIOD_SETTINGS` | The capability to modify grading period settings. |\n| `CREATE_STUDENT_GROUP` | The capability to create and modify student groups and their members. |"]]