Commit b3b0d234 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'devel_12.1.x' into merge-12.1.8

parents 6e5a023f bb8865c3
minerva (12.2.0~beta.1) unstable; urgency=medium
* Small improvement: list of publication can be filtered by submap (#614)
* Small improvement: report bug utility shows confirmation dialog on success
* Small improvement: report bug utility shows confirmation dialog on success
(#648)
* Small improvement: size of add overlay window adjusted to show more data
without scrollbars (#657)
* Small improvement: all popup dialogs in the app have dialog specific css
without scrollbars (#657)
* Small improvement: all popup dialogs in the app have dialog specific css
class names (#665)
* Bug fix: loading icon is not overlapping input in the search panel (#404)
* Bug fix: position of transcription sites in genes are computed properly
* Bug fix: position of transcription sites in genes are computed properly
(#553)
* Bug fix: REQUEST AN ACCOUNT was enabled when associated email was invalid
* Bug fix: REQUEST AN ACCOUNT was enabled when associated email was invalid
(#626)
* Bug fix: layout exported to SBML can be properly visualized by COPASI
* Bug fix: layout exported to SBML can be properly visualized by COPASI
(#654)
* Bug fix: working with too many maps within the single session could crash
* Bug fix: working with too many maps within the single session could crash
connection to server (#651)
* Bug fix: invalid pubmed id could crash listing/downloading publications
* Bug fix: invalid pubmed id could crash listing/downloading publications
(#656)
* Bug fix: icons in safari sometimes disappear (#661)
* Bug fix: downloading reference genome for the second time resulted in an
* Bug fix: downloading reference genome for the second time resulted in an
error (#670)
* Bug fix: plugin validation in admin panel improved to catch more problems
* Bug fix: plugin validation in admin panel improved to catch more problems
(#672)
* Bug fix: drawing corrupted heterodimer association in CellDesigner could
* Bug fix: drawing corrupted heterodimer association in CellDesigner could
crash map upload (#673)
* Bug fix: custom semantic zooming didn't work with pathways imported from
* Bug fix: custom semantic zooming didn't work with pathways imported from
CellDesigner layers (#678)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 7 Feb 2019 14:00:00 +0200
......@@ -107,6 +107,15 @@ minerva (12.2.0~alpha.0) unstable; urgency=medium
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 11 Jan 2019 12:00:00 +0200
minerva (12.1.8) stable; urgency=medium
* Bug fix: add a project reset users custom overlays limit to default (#679)
* Bug fix: edit/remove project button was disabled based on Configuration
Manage Privilege, but should be based on Project Manage Privilege (#681)
* Bug fix: another minor problem with updating privileges introduced in
12.1.6 fixed (#659)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 8 Feb 2019 15:30:00 +0200
minerva (12.1.7) stable; urgency=medium
* Bug fix: problems with updating privileges introduced in 12.1.6 fixed
......
......@@ -1321,8 +1321,7 @@ ServerConnector.updateUser = function (user) {
.then(function (response) {
canModifyPrivileges = JSON.parse(response).privileges.some(function (privilege) {
return privilege.type === PrivilegeType.USER_MANAGEMENT
|| privilege.type === PrivilegeType.PROJECT_MANAGEMENT;
return (privilege.type === PrivilegeType.USER_MANAGEMENT) && parseInt(privilege.value) === 1;
});
return self.getConfiguration();
})
......
......@@ -237,7 +237,7 @@ MapsAdminPanel.prototype.projectToTableRow = function (project, row, user) {
row[4] = status;
var disabled = " disabled ";
if (user.hasPrivilege(self.getConfiguration().getPrivilegeType(PrivilegeType.CONFIGURATION_MANAGE))) {
if (user.hasPrivilege(self.getConfiguration().getPrivilegeType(PrivilegeType.ADD_MAP))) {
disabled = "";
}
row[5] = "<button name='showEditDialog' data='" + project.getProjectId() + "'" + disabled + "><i class='fa fa-edit' style='font-size:17px'></i></button>";
......
......@@ -461,7 +461,6 @@ public class ProjectService implements IProjectService {
userService.setUserPrivilege(owner, privilege);
for (User user : userDao.getAll()) {
if (!user.equals(owner)) {
userService.createDefaultPrivilegesForUser(user);
userService.createDefaultProjectPrivilegesForUser(project, user);
}
}
......
......@@ -860,6 +860,32 @@ public class ProjectServiceTest extends ServiceTestFunctions {
}
}
@Test
public void testCheckGlobalPrivilegesAfterCreateProject() throws Exception {
try {
createUser();
for (PrivilegeType type : PrivilegeType.values()) {
if (type.getPrivilegeObjectType() == null) {
userService.setUserPrivilege(user, type, 2);
}
}
String filename = "testFiles/complexModel/empty_complex_model.zip";
Project project = createComplexProject(projectId, filename);
for (PrivilegeType type : PrivilegeType.values()) {
if (type.getPrivilegeObjectType() == null) {
assertEquals("Global privilege was modified: " + type, 2, userService.getUserPrivilegeLevel(user, type));
}
}
projectService.removeProject(project, null, false, adminToken);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test
public void testUpdateProjectWithoutModel() throws Exception {
try {
......
Supports Markdown
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