Перейти к основному содержанию

Настройка учетной записи

Введение

В организации вы можете настраивать элементы учетной записи пользователей. Это включает в себя, видим ли каждый элемент, а также его правило просмотра и правило изменения.

Когда вы настраиваете элементы учетной записи в организации, эта конфигурация вступает в силу на домашней странице всех членов этой организации.

Как настроить?

У элементов учетной записи есть четыре атрибута:

Column NameSelectable ValueDescription
Name-Account item name.
VisibleTrue / FalseSelect whether this account item is visible on the user home page.
ViewRuleRule ItemsSelect a rule to use when viewing the account item. Controls who can view this field.
ModifyRuleПравилаВыберите правило для изменения элемента учетной записи. Controls who can edit this field.

Understanding View Rule and Modify Rule

View rule and Modify rule provide field-level permission control for user account items:

  • View rule: Determines who can see the value of this account field (e.g., email, phone number, address)
  • Modify rule: Determines who can change the value of this account field

This is different from the broader Permission feature, which controls access to applications and resources. View rule and Modify rule specifically control access to individual user profile fields.

Configuration Steps

Чтобы настроить элементы учетной записи, выполните следующие шаги:

  1. Navigate to Organizations in the Casdoor sidebar

  2. Click on your organization to open the Edit Organization page

  3. Scroll down to the Account items section

    account_customize.png

  4. Casdoor предоставляет простые операции для настройки элементов учетной записи:

    a. Set item visibility

    Control whether this account item is shown on the user home page:

    account_visible.png

    b. Set viewing and modifying rules

    Configure who can view and modify each field:

    account_rule.png

Available Rules

There are 3 rules available for both View rule and Modify rule:

  • Public: Everyone has permission. Any user can view/modify this field for any user.
  • Self: Each user has their own permission. Users can only view/modify their own field values. The system identifies users by comparing their ID fields first, and if unavailable, falls back to matching the combination of organization owner and username. This ensures the rule works correctly even for users created before the ID field was introduced.
  • Admin: The administrator has permission. Only organization administrators can view/modify this field for users.

Example Use Cases

Here are some common configuration patterns:

FieldView RuleModify RuleUse Case
ИмяPublicSelfEveryone can see names, but users can only change their own
Электронная почтаSelfSelfUsers can only see and change their own email
ТелефонAdminAdminOnly admins can see and change phone numbers (for privacy)
Отображаемое имяPublicSelfPublic profile name visible to all
ПарольSelfSelfUsers can only change their own password
совет

Use Admin rules for sensitive fields like phone numbers, addresses, or internal identifiers that should only be managed by administrators.

заметка

These field-level permissions work in conjunction with the broader Permission system in Casdoor. The Permission system controls access to applications and API resources, while View rule and Modify rule control access to specific user profile fields within the Edit Organization page configuration.

Таблица учетных записей

Ниже приведены все поля элемента учетной записи. Для описаний вы можете обратиться к пользователю.

  • Организация
  • ID
  • Name
  • Display name
  • Аватар
  • Тип пользователя
  • Password
  • Email
  • Phone
  • Country code
  • Страна/Регион
  • Местоположение
  • Принадлежность
  • Звание
  • ID card type
  • ID card
  • Real name - The user's verified real name (locked after ID verification)
  • ID verification - Controls visibility and access to the verify identity button
  • Домашняя страница
  • Биография
  • Тег
  • Заявка на регистрацию
  • Register type
  • Register source
  • Roles
  • Permissions
  • Groups
  • Вход через сторонние сервисы
  • Свойства
  • Администратор
  • Запрещен
  • Удален
  • Multi-factor authentication
  • WebAuthn credentials
  • Managed accounts
  • MFA accounts