Event organization attendee pages test a permission that no module declares
Found by listing every permission code passed to hasRight() and comparing it with the codes the modules declare. Reporting rather than sending a PR, because the correct target right is a design decision.
Four call sites test a three level right whose middle segment is declared nowhere:
- eventorganization/conferenceorboothattendee_card.php lines 704 and 705, read and write
- eventorganization/conferenceorboothattendee_note.php lines 64 and 65, write
They call $user->hasRight('project', 'conferenceorboothattendee', 'read' or 'write'). modProjet declares no conferenceorboothattendee right, and modEventOrganization declares plain read, write and delete under rights_class eventorganization. The occurrences of conferenceorboothattendee in that module file are menu urls and extrafield keys, not rights. hasRight() therefore always returns false.
The effect is limited but real: on the attendee card the document block gets genallowed and delallowed false, so no PDF can be built and no attached file removed, and on the note page permissionnote and permissiontoadd are false, so the notes can never be edited. Access to the pages themselves is unaffected, they are gated by restrictedArea($user, 'projet', ...) just below.
The rest of the module gates on project rights, 17 hasRight('project', 'write') and 7 hasRight('project', 'read'), which suggests the intent was project->write and project->read. I did not send a patch since that grants a capability currently denied, so it should be your call whether these pages follow the project rights or should get their own eventorganization ones.
Present on 24.0 and develop.
Source: Dolibarr/dolibarr