Skip to content

Intent: personalReadOnly should suppress the child Add button on the my form #6425

Description

@delchev

personalReadOnly: true (#6369) correctly makes the personal surface see-only in most places: the generated
<Entity>MyController refuses create/update/delete, and the my list has no New button.

The my form still renders an Add button for each composition-child panel:

<button x-h-button data-variant="primary" data-size="sm" @click="addChild(child)">

e.g. gen/<module>/views/my/Payslip-form.html offers Add for the PayslipLine panel although
PayslipLineMyController returns 403 for every write (children correctly inherit the read-only scope).

So it is safe - the server refuses - but it is an affordance that always fails, on exactly the surfaces
(a payslip, a leave-balance account) where the point is that the owner may look and not author. The Save and
Delete triggers are already suppressed on the same page; only the child panel's Add leaks.

Ask: suppress the child Add button when the personal surface is read-only.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions