Commit 92e45bd6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '600-disable-add-project' into 'devel_12.1.x'

Resolve "disable "ADD PROJECT" button or improve error message `403` when `ADD_MAP = 0`"

See merge request minerva/core!557
parents 4c2a6d30 4759cbca
Pipeline #8009 passed with stage
in 1 minute and 54 seconds
minerva (12.1.4) stable; urgency=medium
* Bug fix: upload of data overlay from admin panel didn't work
* Bug fix: add project button is disabled when user doesn't have proper
privileges ("Add project" privilege)
* Bug fix: there are no more extra markers due to map wrapping
* Bug fix: upload of the project failed when another project was removed
during upload
......
......@@ -191,7 +191,7 @@ MapsAdminPanel.prototype.init = function () {
return self.getServerConnector().getLoggedUser();
}).then(function (user) {
var configuration = self.getConfiguration();
var canAddProject = user.hasPrivilege(configuration.getPrivilegeType(PrivilegeType.PROJECT_MANAGEMENT));
var canAddProject = user.hasPrivilege(configuration.getPrivilegeType(PrivilegeType.ADD_MAP));
$("[name='addProject']", self.getElement()).attr("disabled", !canAddProject);
});
};
......
......@@ -33,6 +33,7 @@ PrivilegeType.prototype.constructor = PrivilegeType;
PrivilegeType.CONFIGURATION_MANAGE = 'CONFIGURATION_MANAGE';
PrivilegeType.MANAGE_GENOMES = 'MANAGE_GENOMES';
PrivilegeType.PROJECT_MANAGEMENT = 'PROJECT_MANAGEMENT';
PrivilegeType.ADD_MAP = 'ADD_MAP';
PrivilegeType.USER_MANAGEMENT = 'USER_MANAGEMENT';
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment