“Access denied” when creating a bank account

In Dolibarr 24.0.0, creating a bank account is refused depending on the reference entered, even as an administrator. The real cause, and the fix in 24.0.1.

Versions concerned
Dolibarr 24.0.0 · fixed in 24.0.1
What was checked
Reproduced on a Dolibarr 24.0.0 test instance, logged in as administrator. The project’s fix and the 24.0.1 changelog reviewed.

You create a bank account, you save, and Dolibarr replies “Access denied”. You check your permissions: you are an administrator. You check them again. You look at the permissions of the Banks & Cash module. There is nothing to find there.

The cause

The refusal depends on what you entered as the account reference. On 24.0.0, a reference containing a digit is enough to trigger the rejection, whatever your level of permissions.

How this was verified

On a Dolibarr 24.0.0 test instance, logged in as administrator:

  • reference BQ1“Access denied”, account not created;
  • reference COURANTaccount created normally.

Same user, same permissions, same screen. Only the reference changes. The error message is therefore talking about something other than the real problem.

The two ways out

Upgrade to 24.0.1 or later. The defect has been fixed since that version: it is listed in its changelog, and the fix is public. A maintenance release fixes things; it adds nothing.

For now, on a 24.0.0. Give the account a purely alphabetic reference, and correct it after the upgrade if need be.

The takeaway

“Access denied” is a generic message: Dolibarr displays it for several different checks, some of which have nothing to do with permissions. Before spending an hour in the permissions, change one input at a time. It is quicker, and it tells you straight away whether the problem comes from the data or from the user.

Dolibarrbank accountaccess denied24.0.024.0.1