Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restriction by hostgroup not respected in Director's Host overview #2775

Closed
bobapple opened this issue Jul 14, 2023 · 0 comments
Closed

Restriction by hostgroup not respected in Director's Host overview #2775

bobapple opened this issue Jul 14, 2023 · 0 comments
Assignees
Labels
Milestone

Comments

@bobapple
Copy link
Member

Expected Behavior

If I restrict a role by hostgroup(s) they should only see those hosts in the overview which are part of the hostgroup

Current Behavior

The "Hosts" overview of Director displays all hosts. Opening a host which is not part of the hostgroup shows "No such object available". Editing Hosts which belong to the restricted hostgroup works as expected.

Possible Solution

😬 😬 😬

--- a/library/Director/Web/Table/ObjectsTable.php
+++ b/library/Director/Web/Table/ObjectsTable.php
@@ -298,6 +298,7 @@ class ObjectsTable extends ZfQueryBasedTable
             $query->order('object_name')->limit(100);
         } else {
             $this->applyObjectTypeFilter($query);
+            $query = $this->applyRestrictions($query);
             $query->order('o.object_name')->limit(100);
         }
         

Steps to Reproduce (for bugs)

Create a role with the following Director permissions:

Screenshot 2023-07-14 at 12 09 02

Your Environment

  • Director version (System - About): v1.10.2
@Thomas-Gelf Thomas-Gelf added this to the v1.11.0 milestone Jul 18, 2023
@Thomas-Gelf Thomas-Gelf self-assigned this Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants