Fixed issue: cannot assign a resource to a user who has an organization (#5218)

main
Boris Sekachev 3 years ago committed by GitHub
parent 49bdef01f1
commit 02eba10b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,6 +63,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428)
- Changing an object causes current z layer to be set to the maximum (<https://github.com/opencv/cvat/pull/5145>)
- Job assignee can not resolve an issue (<https://github.com/opencv/cvat/pull/5167>)
- Create manifest with cvat/server docker container command (<https://github.com/opencv/cvat/pull/5172>)
- Cannot assign a resource to a user who has an organization (<https://github.com/opencv/cvat/pull/5218>)
### Security
- TDB

@ -1,6 +1,6 @@
{
"name": "cvat-core",
"version": "7.0.2",
"version": "7.0.3",
"description": "Part of Computer Vision Tool which presents an interface for client-side integration",
"main": "src/api.ts",
"scripts": {

@ -216,7 +216,15 @@ class ServerProxy {
return reqConfig;
}
reqConfig.params = { ...enableOrganization(), ...(reqConfig.params || {}) };
const organization = enableOrganization();
// for users when organization is unset
// we are interested in getting all the users,
// not only those who are not in any organization
if (reqConfig.url.endsWith('/users') && !organization.org) {
return reqConfig;
}
reqConfig.params = { ...organization, ...(reqConfig.params || {}) };
return reqConfig;
});

Loading…
Cancel
Save