-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
In the current implementation, when a user attempts to grab the configuration for a given server, the code runs a for loop to fetch the config mapping for that server. Then it uses this to verify if this server is in the users groups. This works, but comes at the cost of extra CPU cycles than if we would be taking the server configuration directly.
Describe the solution you'd like
An idea I got so far is to change the behavior so the steps happens as follows
- Modify the data structure to be a 2-layer dictionary (
server_mappings[server_name][config_option]) - Before grabbing the code verify if the requested server is in the list (if server in server_mappings)
- Verify if server group mapping is in the users allowed list (if goup_mapping in users_groups)
Describe alternatives you've considered
Nil so far
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request