跳到主内容

Customize the account page

This guide explains how to configure the account items of an organization. Account items are the fields on the account page and the user edit page of every member of the organization. For each field, you decide whether it is visible, who can view it, and who can edit it.


Learning outcomes​

  • Show or hide fields of the account page.
  • Restrict who can view and edit a field.
  • Group fields into tabs and choose the layout of the tabs.

What you need​

  • Administrator access to the organization in the Casdoor admin console

About account items​

Each account item has the following settings:

ColumnValues描述
名称A field from the list of account itemsThe field
可见On or offWhether the field appears on the account page
View rulePublic, Self, AdminWho can see the value of the field
Modify ruleSelf, Admin, ImmutableWho can change the value of the field
选项卡TextTab under which the field appears on the user edit page

The rules have the following meaning:

RuleWho can view or change the field
PublicView rule only. Everyone can see the field of any user
SelfEach user, for their own account only. Casdoor matches by user ID, or by organization and username if the ID is missing
AdminAdministrators of the organization only
ImmutableModify rule only. Nobody can change the field on the account page
备注

View rules and modify rules apply to single fields of a user profile. They are separate from permissions, which control access to applications and resources.

Configure the account items​

  1. In the Casdoor admin console, go to User Management > Organizations and open the organization.

  2. Scroll to Account items.

    Account items of an organization

  3. To show or hide a field, switch Visible.

    Visible switch of an account item

  4. To restrict a field, select a View rule and a Modify rule.

    View rule and Modify rule of an account item

  5. Save the organization.

Common patterns​

字段View RuleModify RuleUse Case
NamePublicSelfEveryone can see names, but users can only change their own
EmailSelfSelfUsers can only see and change their own email
PhoneAdminAdminOnly admins can see and change phone numbers (for privacy)
Display namePublicSelfPublic profile name visible to all
PasswordSelfSelfUsers can only change their own password
提示

Use the Admin rule for sensitive fields that only administrators should manage, such as phone numbers, addresses, and internal identifiers.

Group fields into tabs​

Items with the same Tab value appear together under one tab of the user edit page. Items without a tab value appear first, outside the tabs.

For example, to create a Contact tab with the email address, the phone number, and the location:

  1. Open the organization and scroll to Account items.
  2. Set Tab to Contact in the rows Email, Phone, and Location.
  3. Save the organization. The user edit page now has a Contact tab with the three fields.

Choose the tab layout​

Account menu on the organization edit page sets how the tabs are shown:

OptionLayout
Horizontal (default)Tabs across the top of the page
VerticalA menu on the left side of the page. Use it for organizations with many tabs

List of account items​

Field描述
组织用户所属的组织。
ID用户的全局唯一标识(UUID)。
Name用户在组织内唯一的登录用户名。
Display name用户资料上公开显示的名称。
名用户的名。
姓用户的姓。
头像用户的头像。
用户类型用户账号的类别(例如普通用户、服务账号)。
密码用户的登录密码。
邮箱用户的邮箱地址,用于登录和通知。
电话用户的手机号,用于登录和短信验证。
国家代码手机号的国家 / 区号(例如美国为 +1),与 Phone 一起使用。
国家/地区用户所在的国家或地区。
城市用户所在的城市或地址。
附属机构用户的公司、学校或其他所属机构。
职务用户的职位或头衔。
身份证类型政府签发的身份证件类型(例如护照、身份证、驾照)。
身份证号用户身份证件的号码。
身份证照片身份证件的其他信息(例如签发日期、有效期)。只有用户本人可见。
真实姓名用户经过验证的法定姓名。完成身份验证后会被锁定,不能再修改。
身份验证控制资料页上 Verify identity 按钮的显示和使用权限。
个人主页用户的个人网站或在线资料地址。
自我介绍简短的个人简介。
标签附加在用户上的一个或多个自定义标签,用于筛选或分组。
注册应用用户最初注册时使用的应用。
注册类型注册账号的方式(例如邮箱、手机号、OAuth)。
注册来源用户注册的渠道或提供商(例如 Google、GitHub、邀请链接)。
角色分配给这个用户的角色,决定其在 Casdoor 中的访问权限。
权限明确授予这个用户的权限。
用户所属的组这个用户所属的用户群组。
第三方登录用于社交登录的已关联第三方 OAuth 账号(例如 Google、GitHub、微信)。
属性自定义键值对,用于存放与用户相关的其他应用数据。
余额用户的账户余额,用于内置的支付或积分功能。
余额积分用户账户余额的下限。必须 ≤ 0。设为 0(默认)表示余额不能为负。设为负值(例如 -50)表示余额最低可以降到该值,再低交易就会被拒绝。
余额币种用户余额的币种(例如 USD、CNY)。
购物车加入用户购物车的商品(用于电商集成)。
得分分配给用户的积分,通常由应用逻辑设定。
信誉分反映用户活跃度或社区地位的声望值。
排名用户在所有用户中的排名,由积分或其他指标得出。
语言用户偏好的 Casdoor 界面语言。
是否为管理员用户是否拥有组织管理员权限。
是否被禁用用户账号是否被封禁;被封禁的用户不能登录。
是否已删除用户账号是否已被软删除(标记为删除,但仍保留在数据库中)。
多因素认证用户的 MFA 设置和已绑定的第二因素方式(例如 TOTP 应用、短信)。
MFA设置项用户已绑定的各项 MFA 方式列表。
WebAuthn凭据用于无密码登录的已注册通行密钥或硬件安全密钥(WebAuthn/FIDO2)。
上次修改密码时间用户最近一次修改密码的时间。仅管理员可见。
托管账户这个用户可以代为管理的子账号或委托账号。
面容ID用于生物识别登录的已录入人脸数据。
MFA账户专门为多因素认证关联的外部账号。
需要更新密码用户下次登录时是否必须修改密码。仅管理员可见。设置后,用户登录后会被跳转到 Account 页面,修改密码之前不能去其他页面。
IP白名单允许该用户登录的 IP 地址或 CIDR 网段。仅管理员可见。

See also​