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

Misleading error message when starting jobs for datasets of other organizations #8165

Closed
fm3 opened this issue Nov 4, 2024 · 2 comments · Fixed by #8181
Closed

Misleading error message when starting jobs for datasets of other organizations #8165

fm3 opened this issue Nov 4, 2024 · 2 comments · Fixed by #8181

Comments

@fm3
Copy link
Member

fm3 commented Nov 4, 2024

Starting processing jobs for datasets of other organizations is not currently allowed, even if the datasets are public or viewed by a valid sharing token.

While fully allowing this for some jobs/situations is a topic for another day (also compare discussion at #7360 ), what can be improved now is the error message.

Some jobs already have a readable error message, like “Currently nuclei inferral is only allowed for datasets of your own organization.”. However, some, like render_animation, just show “Organization b2275d664e4c2a96 could not be found”. This should be unified, e.g. by passing GlobalAccessContext to organizationDAO.findOne, and then checking request.identity._organization == organization._id with a suitable message.

The same should be done for runTraining and runInference in AiModelController. Looks like the frontend does not currently send the organizationId there at all, which leads to unusable 404 errors if tried on another orga’s dataset

@normanrz
Copy link
Member

Probably, it would also be better to not even have the button for these datasets

@fm3
Copy link
Member Author

fm3 commented Nov 12, 2024

I agree! I think this can be done in two separate PRs though. The backend improved error message thing should be a very quick change, while adding the permission logic to the frontend seems a little more complex.

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

Successfully merging a pull request may close this issue.

3 participants