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

fix: only broadcast active_generations for self or admin #434

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions horde/classes/base/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,11 +861,6 @@ def get_details(self, details_privilege=0):
for worker in self.workers:
workers_array.append(str(worker.id))
ret_dict["worker_ids"] = workers_array
ret_dict["active_generations"] = {}
for wp in self.waiting_prompts:
if wp.wp_type not in ret_dict["active_generations"]:
ret_dict["active_generations"][wp.wp_type] = []
ret_dict["active_generations"][wp.wp_type].append(str(wp.id))
if details_privilege >= 1:
sharedkeys_array = []
for sk in self.sharedkeys:
Expand All @@ -874,6 +869,11 @@ def get_details(self, details_privilege=0):
ret_dict["contact"] = self.contact
ret_dict["vpn"] = self.vpn
ret_dict["special"] = self.special
ret_dict["active_generations"] = {}
for wp in self.waiting_prompts:
if wp.wp_type not in ret_dict["active_generations"]:
ret_dict["active_generations"][wp.wp_type] = []
ret_dict["active_generations"][wp.wp_type].append(str(wp.id))
if details_privilege >= 2:
mk_dict = {
"amount": self.calculate_monthly_kudos(),
Expand Down
Loading