Simplify security model.
This commit is contained in:
@@ -166,7 +166,7 @@ public class MindmapManagerImpl
|
||||
@Override
|
||||
public MindMap getMindmapByTitle(final String title, final User user) {
|
||||
final MindMap result;
|
||||
List<MindMap> mindMaps = getHibernateTemplate().find("from com.wisemapping.model.MindMap wisemapping where title=? and creator=?", new Object[]{title, user.getUsername()});
|
||||
List<MindMap> mindMaps = getHibernateTemplate().find("from com.wisemapping.model.MindMap wisemapping where title=? and creator=?", new Object[]{title, user});
|
||||
if (mindMaps != null && !mindMaps.isEmpty()) {
|
||||
result = mindMaps.get(0);
|
||||
} else {
|
||||
|
@@ -115,7 +115,7 @@ public class UserManagerImpl
|
||||
newMapUser.setRoleId(collaboration.getRole().ordinal());
|
||||
newMapUser.setMindMap(collaboration.getMindMap());
|
||||
newMapUser.setCollaborator(user);
|
||||
user.addMindmapUser(newMapUser);
|
||||
user.addCollaboration(newMapUser);
|
||||
}
|
||||
|
||||
getHibernateTemplate().delete(col);
|
||||
|
Reference in New Issue
Block a user