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

Server status - Show to all users #1098

Merged
merged 3 commits into from
Aug 21, 2023
Merged

Conversation

ihsaan-ullah
Copy link
Collaborator

@ihsaan-ullah ihsaan-ullah commented Aug 21, 2023

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

Now all users can see server_status page.
Everything stays the same for super admin but for normal users they can do the following:

  • see their own submissions
  • see the submissions which are using a queue whose owner is this user.

Note: a user can see past submissions too if you change a queue in a competition from default to this user's queue. And user can lose all submissions showing before but not anymore because queue is changed to another queue. This happens because queue is part of a competition and not a submission.

Screenshots:

status page link in the menu:
Screenshot 2023-08-21 at 6 25 06 PM

user ihsan01 can see his own submissions running on default queue (*) and he can also see some other submissions from other user because they are running on queue: aaa whose owner is ihsan01
Screenshot 2023-08-21 at 6 23 36 PM

Button in queue page to go to
Screenshot 2023-08-21 at 6 43 09 PM
server status page

Issues this PR resolves

Checklist

  • Code review by me
  • Hand tested by me
  • I'm proud of my work
  • Code review by reviewer
  • Hand tested by reviewer
  • CircleCi tests are passing
  • Ready to merge

@Didayolo
Copy link
Collaborator

Didayolo commented Aug 21, 2023

@ihsaan-ullah

It is not due to this PR, because I can reproduce the bug in develop, but I have identified a problem.

Steps to reproduce:

  • Create a queue "Test 1", and link it to a competition
  • Make a submission
  • Change the queue of the competition to another one, "Test 2"
  • Now, in the server status, the two submissions are marked as submitted to the queue "Test 2" (and the owner of the queue "Test 2" can see both)

We just have to change the queue, without re-submitting, and the queue is changed for all submissions:

Capture d’écran 2023-08-21 à 16 50 16 Capture d’écran 2023-08-21 à 16 50 40

The problem may come from this PR #1091

The way the queue is taken basically just reads the queue of the competition, and not the queue in which the submission was done?

@ihsaan-ullah
Copy link
Collaborator Author

@ihsaan-ullah

It is not due to this PR, because I can reproduce the bug in develop, but I have identified a problem.

Steps to reproduce:

  • Create a queue "Test 1", and link it to a competition
  • Make a submission
  • Change the queue of the competition to another one, "Test 2"
  • Now, in the server status, the two submissions are marked as submitted to the queue "Test 2" (and the owner of the queue "Test 2" can see both)

I agree with this. This is what I mentioned in the Note in the PR:

Note: a user can see past submissions too if you change a queue in a competition from default to this user's queue. And user can lose all submissions showing before but not anymore because queue is changed to another queue. This happens because queue is part of a competition and not a submission.

We just have to change the queue, without re-submitting, and the queue is changed for all submissions:

We are not changing the queue of submission. The problem is that queue is not linked to a submission but to a competition. We can get the queue from competition only.

The problem may come from this PR #1091

No this PR is just displaying thename of the queue of the competition which has this submission.

The way the queue is taken basically just reads the queue of the competition, and not the queue in which the submission was done?

Yes you are right. I think there is no way to track the queue of submission. I maybe wrong but I did not find it anywhere

@Didayolo Didayolo merged commit 32f9b2b into develop Aug 21, 2023
@Didayolo Didayolo deleted the server_status_show_to_all_users branch August 21, 2023 16:11
@Didayolo
Copy link
Collaborator

@ihsaan-ullah That's interesting. I am not really concerned about the potential leakage of information when you switch the queue; if the competition is using your queue, then you are most probably one of the competition organizers. Also, this interface does leak very sensitive information such as IP address of the workers.

The main problem is more that the table is a bit confusing. When trying to debug submissions, if you are not aware of this behavior, it can be misleading.

@ihsaan-ullah
Copy link
Collaborator Author

@ihsaan-ullah That's interesting. I am not really concerned about the potential leakage of information when you switch the queue; if the competition is using your queue, then you are most probably one of the competition organizers. Also, this interface does leak very sensitive information such as IP address of the workers.

The main problem is more that the table is a bit confusing. When trying to debug submissions, if you are not aware of this behavior, it can be misleading.

We should discuss this in the meeting to plan something for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants