ref #8810: check for taxonnode permission and whether the user has taxon node granted...
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / AbstractEntityCollectionSection.java
index 783f6ff133d4717948efd13724b7ea3833ce4100..9dc51edac3ae8fb3e13fa723ad668dbecafd0e9d 100644 (file)
@@ -33,7 +33,7 @@ import org.eclipse.ui.forms.widgets.ExpandableComposite;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.common.CdmUtils;
-import eu.etaxonomy.cdm.persistence.hibernate.permission.CRUD;
+import eu.etaxonomy.cdm.model.permission.CRUD;
 import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.model.ImageResources;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
@@ -141,10 +141,16 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
                    toolBarManager.add(browseAction);
                }
 
+               addAction(toolBarManager);
+
                return toolBarManager.createControl(this);
        }
 
-       /**
+    protected void addAction(ToolBarManager toolBarManager) {
+        // default implementation empty
+    }
+
+    /**
         * using this method is discouraged, use updateToolBar() instead
         */
        public void showToolbar(){
@@ -335,7 +341,7 @@ public abstract class AbstractEntityCollectionSection<ENTITY, ELEMENT> extends A
            }
        }
 
-    private void updateToolbar() {
+    protected void updateToolbar() {
         if(getEntity() != null && CdmStore.currentAuthentiationHasPermission(StoreUtil.getCdmEntity(getEntity()), UPDATE)){
             showToolbar();
         } else {