Invoice Ninja v5: How to make the Account Management setting available to additional (admin) users

Written by - 0 comments

Published on - Listed in Internet Personal Databases


Invoice Ninja allows to create additional users to manage clients, invoices and other data depending on the given permissions.

This is helpful, when your staff handles invoicing and billing but shouldn't really touch and change any of the system settings.

On the other hand you might also want to create a user with elevated privileges with all rights within Invoice Ninja, including the settings. This is possible by toggling the "Administrator" slider above the specific permissions.

Missing Account Management setting

However there is still one thing, the additional users with Administrator permissions can't do: Control system wide Invoice Ninja settings, such as handling the Whitelabel License or creating API keys (tokens).

These settings are controlled in Settings -> Account Management. But this option is not showing up for additional administrator users:

The reason for this option being hidden is that it is only shown to the "owner" of that Invoice Ninja installation. The "owner" flag is automatically set to the first account created in that installation. All additional users do not get that flag. It is also nowhere possible in the application to manually add this flag to a user.

It's all in the database

Luckily there's a solution (there is always a solution!). If you have enough technical knowledge and know some SQL, you can adjust the "owner flag" directly in the database, used by the Invoice Ninja installation.

The setting in question is a simple on (1) or off (0) in the is_owner column in the company_users table:

MariaDB [invoiceninja5]> SELECT id,company_id,account_id,user_id,is_owner,is_admin FROM company_user;
+----+------------+------------+---------+----------+----------+
| id | company_id | account_id | user_id | is_owner | is_admin |
+----+------------+------------+---------+----------+----------+
|  3 |          2 |          1 |       1 |        1 |        1 |
|  4 |          2 |          1 |       2 |        0 |        1 |
+----+------------+------------+---------+----------+----------+
2 rows in set (0.000 sec)

From the SQL output we can see that user_id 1 is defined as owner (is_owner).

Note: To see which user this actually is, launch this SQL query: SELECT id,email FROM users WHERE id = 1;

To set the owner flag on the second user (user_id 2), use the following query:

MariaDB [invoiceninja5]> UPDATE company_user SET is_owner = 1 WHERE user_id = 2;
Query OK, 1 row affected (0.001 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Both users now have the flag is_owner set:

MariaDB [invoiceninja5]> select id,company_id,account_id,user_id,is_owner,is_admin from company_user;
+----+------------+------------+---------+----------+----------+
| id | company_id | account_id | user_id | is_owner | is_admin |
+----+------------+------------+---------+----------+----------+
|  3 |          2 |          1 |       1 |        1 |        1 |
|  4 |          2 |          1 |       2 |        1 |        1 |
+----+------------+------------+---------+----------+----------+
2 rows in set (0.000 sec)

Account Management settings for the second owner user

Right after this change in the database, the second user is now able to see the "Account Management" setting in the application:

Your own Invoice Ninja server - data hosted in Switzerland

Since July 2020 Infiniroot offers dedicated Invoice Ninja servers in Switzerland. This allows you to run your own billing application using InvoiceNinja in a secure server environment and data in Switzerland, even with a low budget!

Since April 2022 Infiniroot's Invoice Ninja servers now also support invoices with Swiss QR Bill payment slips; the new QR-code based payment slips which replace the red and orange payment slips in 2022.


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   OpenSearch   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder