Actions
Evolution #1798
closedSame permissions for core and dynamic fields
Start date:
03/03/2024
Due date:
% Done:
100%
Estimated time:
Vote:
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).
Updated by Johan Cwiklinski 8 months ago
- Category set to Fields management
- Target version set to 1.1.0
Updated by Johan Cwiklinski 8 months ago
- Status changed from Nouveau to Résolu
- % Done changed from 0 to 100
Appliqué par commit ba7bfac92c9efca58e7a9de87dabe32c7ed0c4ad.
Actions