Enum Role
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
角色
用户在群组中的可能角色,例如所有者或普通成员。订阅某个群组的用户在该群组中只能拥有一个角色。
如需调用枚举,您可以调用其父类、名称和属性。例如
GroupsApp.Role.OWNER
。
另请参阅
属性
属性 | 类型 | 说明 |
OWNER | Enum | 群组的所有者。 |
MANAGER | Enum | 群组的管理员。 |
MEMBER | Enum | 属于此群组的用户,但既不是所有者也不是管理员。 |
INVITED | Enum | 群组所有者或管理员邀请加入群组,但尚未接受邀请的用户。 |
PENDING | Enum | 已请求加入群组但尚未获得所有者或管理员批准的用户。 |
BANNED | Enum | 被禁止加入某个群组的用户,无法尝试加入该群组。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eUsers within a group have one role, such as owner or member, impacting their permissions.\u003c/p\u003e\n"],["\u003cp\u003eRoles are defined using an enum structure, accessed with \u003ccode\u003eGroupsApp.Role.{roleName}\u003c/code\u003e (e.g., \u003ccode\u003eGroupsApp.Role.OWNER\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eAvailable roles include \u003ccode\u003eOWNER\u003c/code\u003e, \u003ccode\u003eMANAGER\u003c/code\u003e, \u003ccode\u003eMEMBER\u003c/code\u003e, \u003ccode\u003eINVITED\u003c/code\u003e, \u003ccode\u003ePENDING\u003c/code\u003e, and \u003ccode\u003eBANNED\u003c/code\u003e, each with specific implications for group interaction.\u003c/p\u003e\n"]]],[],null,["# Enum Role\n\nRole\n\nPossible roles of a user within a group, such as owner or ordinary member. Users subscribed to a\ngroup have exactly one role within the context of that group.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nGroupsApp.Role.OWNER`.\n\n#### See also\n\n- [Group.getRole(email)](/apps-script/reference/groups/group#getRole(String)) \n\n### Properties\n\n| Property | Type | Description |\n|-----------|--------|------------------------------------------------------------------------------------------------------------------------------|\n| `OWNER` | `Enum` | The owner of a group. |\n| `MANAGER` | `Enum` | The manager of a group. |\n| `MEMBER` | `Enum` | A user who is a member of this group but is neither an owner nor a manager. |\n| `INVITED` | `Enum` | A user who has been invited to join a group by an owner or manager of the group but who has not yet accepted the invitation. |\n| `PENDING` | `Enum` | A user who has requested to join a group but who has not yet been approved by an owner or manager. |\n| `BANNED` | `Enum` | A user who has been banned from a group and cannot attempt to join it. |"]]