Projet

Général

Profil

Actions

Evolution #1798

fermé

Same permissions for core and dynamic fields

Ajouté par Johan Cwiklinski il y a environ 2 mois. Mis à jour il y a environ un mois.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Catégorie:
Fields management
Version cible:
Début:
03/03/2024
Echéance:
% réalisé:

100%

Temps estimé:

Description

Both core and dynamic fields have a "permission" notion, with similar values... But not at all the same in database :/

For core fields; this is hardcoded directly in pages/edit_core_fields.html.twig template:

[
    FieldsConfig::NOBODY => "Inaccessible", // 0
    FieldsConfig::ADMIN => "Administrator", // 2
    FieldsConfig::STAFF => "Staff member", // 3
    FieldsConfig::MANAGER => "Group manager", // 4
    FieldsConfig::USER_READ => "Read only", // 5
    FieldsConfig::USER_WRITE => "Read/Write" // 1

For dynamic fields, it's retrieved from Galette\DynamicFields\DynamicField::getPermsNames():

[
    DynamicField::PERM_USER_WRITE => _T("User, read/write"), // 0
    DynamicField::PERM_STAFF      => _T("Staff member"), // 2
    DynamicField::PERM_ADMIN      => _T("Administrator"), // 1
    DynamicField::PERM_MANAGER    => _T("Group manager"), // 3
    DynamicField::PERM_USER_READ  => _T("User, read only") // 4
]

It has to be changed to take the same arguments. Migration must be done PHP side; we cannot achieve something correct using SQL queries.

Also, it could be useful for future usages to have a "Public" permission (not reliable for core/dynamic fields).

Mis à jour par Johan Cwiklinski il y a environ 2 mois

  • Catégorie mis à Fields management
  • Version cible mis à 1.1.0

Mis à jour par Johan Cwiklinski il y a environ 2 mois

  • Statut changé de Nouveau à Résolu
  • % réalisé changé de 0 à 100

Mis à jour par Johan Cwiklinski il y a environ un mois

  • Statut changé de Résolu à Fermé
Actions

Formats disponibles : Atom PDF