mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-24 23:17:56 +01:00
Fix removal of maps shared in read-only.
This commit is contained in:
parent
ad84282ef8
commit
b97d5b1a00
@ -38,6 +38,7 @@ public class ViewBaseSecurityAdvise
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean isAllowed(@Nullable User user, Mindmap map) {
|
protected boolean isAllowed(@Nullable User user, Mindmap map) {
|
||||||
|
System.out.println("VIEWWWWWWWWWWWWW");
|
||||||
return getMindmapService().hasPermissions(user, map, CollaborationRole.VIEWER);
|
return getMindmapService().hasPermissions(user, map, CollaborationRole.VIEWER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,4 @@ public interface MindmapService {
|
|||||||
LockManager getLockManager();
|
LockManager getLockManager();
|
||||||
|
|
||||||
boolean isAdmin(@Nullable User user);
|
boolean isAdmin(@Nullable User user);
|
||||||
|
|
||||||
void purgeHistory(int mapId) throws IOException;
|
|
||||||
}
|
}
|
||||||
|
@ -91,11 +91,6 @@ public class MindmapServiceImpl
|
|||||||
return user != null && user.getEmail() != null && user.getEmail().equals(adminUser);
|
return user != null && user.getEmail() != null && user.getEmail().equals(adminUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void purgeHistory(int mapId) throws IOException {
|
|
||||||
mindmapManager.purgeHistory(mapId);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Mindmap getMindmapByTitle(String title, User user) {
|
public Mindmap getMindmapByTitle(String title, User user) {
|
||||||
return mindmapManager.getMindmapByTitle(title, user);
|
return mindmapManager.getMindmapByTitle(title, user);
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
<value>linkLabel</value>
|
<value>linkLabel</value>
|
||||||
<value>find*</value>
|
<value>find*</value>
|
||||||
<value>filter*</value>
|
<value>filter*</value>
|
||||||
|
<!-- Remove can be performed in view only maps -->
|
||||||
|
<value>removeMindmap</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@ -26,19 +28,18 @@
|
|||||||
<value>save*</value>
|
<value>save*</value>
|
||||||
<value>update*</value>
|
<value>update*</value>
|
||||||
<value>add*</value>
|
<value>add*</value>
|
||||||
<value>remove*</value>
|
|
||||||
<value>purge*</value>
|
|
||||||
<value>revert*</value>
|
<value>revert*</value>
|
||||||
|
<value>removeCollaboration</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
|
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="viewSecurityAdvice" class="com.wisemapping.security.aop.ViewBaseSecurityAdvise">
|
<bean id="viewSecurityAdvice" class="com.wisemapping.security.aop.ViewBaseSecurityAdvise">
|
||||||
<property name="mindmapService" ref="mindmapService"/>
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
|
||||||
|
<property name="mindmapService" ref="mindmapService"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
Loading…
Reference in New Issue
Block a user