[PR #608] [MERGED] Fix for access list getAll when not granted all permissions #3273

Closed
opened 2026-02-26 07:38:42 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/608
Author: @Philip-Mooney
Created: 9/19/2020
Status: Merged
Merged: 10/14/2020
Merged by: @jc21

Base: developHead: master


📝 Commits (2)

  • 28f7208 Merge pull request #592 from jc21/develop
  • 3e10b7b Fix for access list getAll when not granted all permissions

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/internal/access-list.js (+1 -1)

📄 Description

When calling access list getAll without permission visibility set as 'all', the access list page gets a 500.

Error log:

[9/19/2020] [10:05:07 PM] [Express ] › ⚠ warning select access_list.*, COUNT(proxy_host.id) as proxy_host_count from access_list LEFT JOIN proxy_host ON proxy_host.access_list_id = access_list.id AND proxy_host.is_deleted = 0 where access_list.is_deleted = 0 and owner_user_id = 1 group by access_list.id order by access_list.name ASC - ER_NON_UNIQ_ERROR: Column 'owner_user_id' in where clause is ambiguous

Correct command:

select `access_list`.*, COUNT(proxy_host.id) as proxy_host_count from `access_list` LEFT JOIN `proxy_host` ON `proxy_host`.`access_list_id` = `access_list`.`id` AND `proxy_host`.`is_deleted` = 0 where `access_list`.`is_deleted` = 0 and `access_list`.`owner_user_id` = 1 group by `access_list`.`id` order by `access_list`.`name` ASC;

Reproduction steps with a new instance:

  1. Create an user and change its Item Visibility to created only permissions and give it manage permission on everything else
  2. Visit the access list page https://nginxproxymanager.mydomain.com/nginx/access

Expected behaviour:

Access list for just current user (empty in case of new instance)

Actual behaviour

500 Internal Server Error

Comments

The issue is fixed for get in https://github.com/jc21/nginx-proxy-manager/blob/master/backend/internal/access-list.js#L262, but not in getAll


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/608 **Author:** [@Philip-Mooney](https://github.com/Philip-Mooney) **Created:** 9/19/2020 **Status:** ✅ Merged **Merged:** 10/14/2020 **Merged by:** [@jc21](https://github.com/jc21) **Base:** `develop` ← **Head:** `master` --- ### 📝 Commits (2) - [`28f7208`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/28f72086ec2d8cd168fbf1aab99c770dfdc0f092) Merge pull request #592 from jc21/develop - [`3e10b7b`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/3e10b7b2b197c856285679def491a61d37ec3717) Fix for access list getAll when not granted all permissions ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/internal/access-list.js` (+1 -1) </details> ### 📄 Description When calling access list getAll without permission visibility set as 'all', the access list page gets a 500. Error log: [9/19/2020] [10:05:07 PM] [Express ] › ⚠ warning select `access_list`.*, COUNT(proxy_host.id) as proxy_host_count from `access_list` LEFT JOIN `proxy_host` ON `proxy_host`.`access_list_id` = `access_list`.`id` AND `proxy_host`.`is_deleted` = 0 where `access_list`.`is_deleted` = 0 and `owner_user_id` = 1 group by `access_list`.`id` order by `access_list`.`name` ASC - ER_NON_UNIQ_ERROR: Column 'owner_user_id' in where clause is ambiguous Correct command: ``` select `access_list`.*, COUNT(proxy_host.id) as proxy_host_count from `access_list` LEFT JOIN `proxy_host` ON `proxy_host`.`access_list_id` = `access_list`.`id` AND `proxy_host`.`is_deleted` = 0 where `access_list`.`is_deleted` = 0 and `access_list`.`owner_user_id` = 1 group by `access_list`.`id` order by `access_list`.`name` ASC; ``` ### Reproduction steps with a new instance: 1. Create an user and change its Item Visibility to created only permissions and give it manage permission on everything else 2. Visit the access list page https://nginxproxymanager.mydomain.com/nginx/access ### Expected behaviour: Access list for just current user (empty in case of new instance) ### Actual behaviour 500 Internal Server Error ### Comments The issue is fixed for get in https://github.com/jc21/nginx-proxy-manager/blob/master/backend/internal/access-list.js#L262, but not in getAll --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 07:38:42 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3273
No description provided.