Fix removal of maps shared in read-only.
parent
ad84282ef8
commit
b97d5b1a00
|
@ -38,6 +38,7 @@ public class ViewBaseSecurityAdvise
|
|||
|
||||
@Override
|
||||
protected boolean isAllowed(@Nullable User user, Mindmap map) {
|
||||
System.out.println("VIEWWWWWWWWWWWWW");
|
||||
return getMindmapService().hasPermissions(user, map, CollaborationRole.VIEWER);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,4 @@ public interface MindmapService {
|
|||
LockManager getLockManager();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purgeHistory(int mapId) throws IOException {
|
||||
mindmapManager.purgeHistory(mapId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mindmap getMindmapByTitle(String title, User user) {
|
||||
return mindmapManager.getMindmapByTitle(title, user);
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
<value>linkLabel</value>
|
||||
<value>find*</value>
|
||||
<value>filter*</value>
|
||||
<!-- Remove can be performed in view only maps -->
|
||||
<value>removeMindmap</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
@ -26,19 +28,18 @@
|
|||
<value>save*</value>
|
||||
<value>update*</value>
|
||||
<value>add*</value>
|
||||
<value>remove*</value>
|
||||
<value>purge*</value>
|
||||
<value>revert*</value>
|
||||
<value>removeCollaboration</value>
|
||||
</list>
|
||||
</property>
|
||||
</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">
|
||||
<property name="mindmapService" ref="mindmapService"/>
|
||||
</bean>
|
||||
|
||||
<bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
|
||||
<property name="mindmapService" ref="mindmapService"/>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
|
Loading…
Reference in New Issue