From 2d440d1bb20e3edb5d797488a0de0c3771ea2fed Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Wed, 8 Aug 2012 16:26:23 +0200
Subject: [PATCH] OO-291: implements public flag for members in group
 configuration, check paypal against waiting list, test reservations, fix
 missing chat checkbox in group collaboration tools configuration

---
 .../CollaborationToolsSettingsController.java |  3 +-
 .../configuration/PersistedProperties.java    | 16 +++-
 .../generic/layout/GenericMainController.java |  4 +
 .../java/org/olat/core/util/StringHelper.java | 11 ++-
 .../ImportPortfolioReferencesController.java  |  1 -
 .../manager/BusinessGroupImportExport.java    |  2 +-
 .../manager/BusinessGroupPropertyDAO.java     | 40 ++++++--
 .../manager/BusinessGroupServiceImpl.java     |  8 +-
 .../org/olat/group/model/DisplayMembers.java  | 28 ++++++
 .../group/ui/BusinessGroupFormController.java |  6 +-
 .../BusinessGroupEditAccessController.java    | 25 ++++-
 .../ui/edit/BusinessGroupEditController.java  | 16 +++-
 .../BusinessGroupEditDetailsController.java   |  4 +
 .../edit/BusinessGroupMembersController.java  |  9 +-
 .../ui/edit/DisplayMemberSwitchForm.java      | 91 +++++++------------
 .../ui/edit/_i18n/LocalStrings_de.properties  |  3 +
 .../ui/homepage/GroupInfoMainController.java  |  2 +-
 .../run/BusinessGroupMainRunController.java   |  5 +-
 .../RepositoryEditPropertiesController.java   |  2 +-
 .../manager/ACFrontendManager.java            |  2 +-
 .../method/AccessMethodHandler.java           |  2 +
 .../model/ResourceReservationImpl.java        |  1 -
 .../provider/free/FreeAccessHandler.java      |  5 +
 .../provider/paypal/PaypalAccessHandler.java  |  5 +
 .../provider/paypal/_spring/paypalContext.xml |  3 +-
 .../provider/token/TokenAccessHandler.java    |  5 +
 .../ui/AccessConfigurationController.java     | 38 +++++++-
 .../service/indexer/group/GroupIndexer.java   |  3 +-
 .../database/mysql/setupDatabase.sql          |  2 +-
 .../database/postgresql/setupDatabase.sql     | 12 +--
 .../resources/serviceconfig/olat.properties   |  2 +-
 31 files changed, 245 insertions(+), 111 deletions(-)

diff --git a/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java b/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java
index 216f53d85fc..f3bd0626a71 100644
--- a/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java
+++ b/src/main/java/org/olat/collaboration/CollaborationToolsSettingsController.java
@@ -46,6 +46,7 @@ import org.olat.core.id.OLATResourceable;
 import org.olat.core.util.coordinate.CoordinatorManager;
 import org.olat.core.util.resource.OresHelper;
 import org.olat.core.util.vfs.QuotaManager;
+import org.olat.instantMessaging.InstantMessagingModule;
 
 /**
  * Description: <BR>
@@ -265,7 +266,7 @@ class ChoiceOfToolsForm extends FormBasicController {
 		
 		for (int i=0; i<CollaborationTools.TOOLS.length; i++) {
 			String k = CollaborationTools.TOOLS[i];
-			if (k.equals(CollaborationTools.TOOL_CHAT)) {
+			if (k.equals(CollaborationTools.TOOL_CHAT) && !InstantMessagingModule.isEnabled()) {
 				continue;
 			}
 			theKeys.add(""+i);
diff --git a/src/main/java/org/olat/core/configuration/PersistedProperties.java b/src/main/java/org/olat/core/configuration/PersistedProperties.java
index 04c3276b25b..dde28d44ce0 100644
--- a/src/main/java/org/olat/core/configuration/PersistedProperties.java
+++ b/src/main/java/org/olat/core/configuration/PersistedProperties.java
@@ -150,7 +150,8 @@ public class PersistedProperties extends LogDelegator implements Initializable,
 	private OLATResourceable PROPERTIES_CHANGED_EVENT_CHANNEL;
 	private CoordinatorManager coordinatorManager;
 	
-	private boolean secured;
+	private final boolean secured;
+	private final String filename;
 	
 	static {
   	Security.insertProviderAt(new BouncyCastleProvider(), 1);
@@ -159,6 +160,14 @@ public class PersistedProperties extends LogDelegator implements Initializable,
 	public PersistedProperties(CoordinatorManager coordinatorManager, GenericEventListener listener, boolean secured) {
 		this.coordinatorManager = coordinatorManager;
 		this.propertiesChangedEventListener = listener;
+		this.filename = propertiesChangedEventListener.getClass().getCanonicalName() + ".properties";
+		this.secured = secured;
+	}
+	
+	public PersistedProperties(CoordinatorManager coordinatorManager, GenericEventListener listener, String filename, boolean secured) {
+		this.coordinatorManager = coordinatorManager;
+		this.propertiesChangedEventListener = listener;
+		this.filename = filename + ".properties";
 		this.secured = secured;
 	}
 	
@@ -171,6 +180,8 @@ public class PersistedProperties extends LogDelegator implements Initializable,
 		this.coordinatorManager = coordinatorManager;
 		// Keep handle for dispose process
 		this.propertiesChangedEventListener = listener;
+		this.filename= propertiesChangedEventListener.getClass().getCanonicalName()	+ ".properties";
+		this.secured = false;
 	}
 	
 	// fxdiff: backward compatibility
@@ -186,8 +197,7 @@ public class PersistedProperties extends LogDelegator implements Initializable,
 	 */
 	public void init() {
 		// Load configured properties from properties file
-		configurationPropertiesFile = new File(SYSTEM_CONFIG_DIRECTORY, propertiesChangedEventListener.getClass().getCanonicalName()
-				+ ".properties");
+		configurationPropertiesFile = new File(SYSTEM_CONFIG_DIRECTORY, filename);
 		loadPropertiesFromFile();
 		// Finally add listener to configuration changes done in other nodes
 		PROPERTIES_CHANGED_EVENT_CHANNEL = OresHelper.createOLATResourceableType(propertiesChangedEventListener.getClass().getSimpleName()
diff --git a/src/main/java/org/olat/core/gui/control/generic/layout/GenericMainController.java b/src/main/java/org/olat/core/gui/control/generic/layout/GenericMainController.java
index 98fdfbd6ac3..a4dae1916a9 100644
--- a/src/main/java/org/olat/core/gui/control/generic/layout/GenericMainController.java
+++ b/src/main/java/org/olat/core/gui/control/generic/layout/GenericMainController.java
@@ -395,6 +395,10 @@ public abstract class GenericMainController extends MainLayoutBasicController {
 		if (viewIdentifier != null && viewIdentifier.startsWith(GMCMT)) {
 			Long extensionID = Long.parseLong(viewIdentifier.substring(viewIdentifier.indexOf(':') + 1));
 			Extension ee = ExtManager.getInstance().getExtensionByID(extensionID);
+			if(ee == null){
+				logWarn("ExtManager did not find an Extension for extensionID '"+extensionID+"'. Activate canceled..." , null);
+				return;
+			}
 			ae = (ActionExtension) ee.getExtensionFor(className, ureq);
 		} else {
 			int vwindex = viewIdentifier.lastIndexOf(":"); 
diff --git a/src/main/java/org/olat/core/util/StringHelper.java b/src/main/java/org/olat/core/util/StringHelper.java
index 121d7c826b1..9327c1243fa 100644
--- a/src/main/java/org/olat/core/util/StringHelper.java
+++ b/src/main/java/org/olat/core/util/StringHelper.java
@@ -209,7 +209,7 @@ public class StringHelper {
 	 * @param m The (hash) map with the key and values
 	 * @return The string array containing all keys for this map
 	 */
-	public static String[] getMapKeysAsStringArray(Map m) {
+	public static String[] getMapKeysAsStringArray(Map<String,?> m) {
 		return (String[]) m.keySet().toArray(new String[m.size()]);
 	}
 
@@ -219,7 +219,7 @@ public class StringHelper {
 	 * @param m The (hash) map with the key and values
 	 * @return The string array containing all values for this map
 	 */
-	public static String[] getMapValuesAsStringArray(Map m) {
+	public static String[] getMapValuesAsStringArray(Map<?,String> m) {
 		return (String[]) m.values().toArray(new String[m.size()]);
 	}
 
@@ -293,12 +293,12 @@ public class StringHelper {
 	 * @return "email1, email2, email3," or null if emailRecipientIdentites was
 	 *         null
 	 */
-	public static String formatIdentitesAsEmailToString(final List emailRecipients, String delimiter) {
+	public static String formatIdentitesAsEmailToString(final List<String> emailRecipients, String delimiter) {
 		int elCnt = emailRecipients.size();
 		//2..n recipients
 		StringBuilder tmpDET = new StringBuilder();
 		for (int i = 0; i < elCnt; i++) {
-			tmpDET.append((String) emailRecipients.get(i));
+			tmpDET.append(emailRecipients.get(i));
 			if (i < elCnt - 1) {
 				tmpDET.append(delimiter);
 			}
@@ -331,6 +331,9 @@ public class StringHelper {
 	}
 	
 	public static boolean isLong(String string) {
+		if(string == null || string.length() == 0) {
+			return false;
+		}
 		char[] charArr = string.toCharArray();
 		for(int i=charArr.length; i-->0; ) {
 			char ch = charArr[i];
diff --git a/src/main/java/org/olat/course/repository/ImportPortfolioReferencesController.java b/src/main/java/org/olat/course/repository/ImportPortfolioReferencesController.java
index f995e2cba19..2df9755e105 100644
--- a/src/main/java/org/olat/course/repository/ImportPortfolioReferencesController.java
+++ b/src/main/java/org/olat/course/repository/ImportPortfolioReferencesController.java
@@ -47,7 +47,6 @@ import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.core.util.Util;
 import org.olat.course.nodes.CourseNode;
-import org.olat.course.nodes.portfolio.PortfolioCourseNodeConfiguration;
 import org.olat.course.nodes.portfolio.PortfolioCourseNodeEditController;
 import org.olat.portfolio.EPTemplateMapResource;
 import org.olat.portfolio.manager.EPFrontendManager;
diff --git a/src/main/java/org/olat/group/manager/BusinessGroupImportExport.java b/src/main/java/org/olat/group/manager/BusinessGroupImportExport.java
index 887f4bf42e1..40484185deb 100644
--- a/src/main/java/org/olat/group/manager/BusinessGroupImportExport.java
+++ b/src/main/java/org/olat/group/manager/BusinessGroupImportExport.java
@@ -304,7 +304,7 @@ public class BusinessGroupImportExport {
 				if (group.showWaitingList != null) {
 					showWaitingList = group.showWaitingList;
 				}
-				businessGroupPropertyManager.updateDisplayMembers(newGroup, showOwners, showParticipants, showWaitingList);
+				businessGroupPropertyManager.updateDisplayMembers(newGroup, showOwners, showParticipants, showWaitingList, false, false, false);
 			}
 		}
 		return env;
diff --git a/src/main/java/org/olat/group/manager/BusinessGroupPropertyDAO.java b/src/main/java/org/olat/group/manager/BusinessGroupPropertyDAO.java
index e1a0644aeb8..2651c8eda30 100644
--- a/src/main/java/org/olat/group/manager/BusinessGroupPropertyDAO.java
+++ b/src/main/java/org/olat/group/manager/BusinessGroupPropertyDAO.java
@@ -25,6 +25,7 @@
 
 package org.olat.group.manager;
 
+import org.olat.core.util.StringHelper;
 import org.olat.group.BusinessGroup;
 import org.olat.properties.Property;
 import org.olat.properties.PropertyConstants;
@@ -80,14 +81,21 @@ public class BusinessGroupPropertyDAO {
 	 * @param showOwners
 	 * @param showPartips
 	 */
-	public void updateDisplayMembers(BusinessGroup group, boolean showOwners, boolean showPartips, boolean showWaitingList) {
+	public void updateDisplayMembers(BusinessGroup group, boolean showOwners, boolean showPartips, boolean showWaitingList,
+			boolean ownrsPublic, boolean partipsPublic, boolean waitingListPublic) {
 		long showXXX = 0;
 		if (showOwners) showXXX += showOwnersVal;
 		if (showPartips) showXXX += showPartipsVal;
 		if (showWaitingList) showXXX += showWaitingListVal;
 		
+		long publicXXX = 0;
+		if (ownrsPublic) publicXXX += showOwnersVal;
+		if (partipsPublic) publicXXX += showPartipsVal;
+		if (waitingListPublic) publicXXX += showWaitingListVal;
+		
 		Property property = findProperty(group);
 		property.setLongValue(new Long(showXXX));
+		property.setStringValue(Long.toString(publicXXX));
 		propertyManager.updateProperty(property);
 	}
 
@@ -120,7 +128,6 @@ public class BusinessGroupPropertyDAO {
 	public boolean showPartips(Property prop) {
 		return ((getDisplayMembersValue(prop) & showPartipsVal) == showPartipsVal);
 	}
-	
 
 	/**
 	 * true if Members can see the Waiting, false otherwise. If the property
@@ -132,11 +139,31 @@ public class BusinessGroupPropertyDAO {
 	public boolean showWaitingList(Property prop) {
 		return ((getDisplayMembersValue(prop) & showWaitingListVal) == showWaitingListVal);
 	}
+	
+	public boolean isOwnersPublic(Property prop) {
+		return ((getPublicMembersValue(prop) & showOwnersVal) == showOwnersVal);
+	}
+
+	public boolean isPartipsPublic(Property prop) {
+		return ((getPublicMembersValue(prop) & showPartipsVal) == showPartipsVal);
+	}
+
+	public boolean isWaitingListPublic(Property prop) {
+		return ((getPublicMembersValue(prop) & showWaitingListVal) == showWaitingListVal);
+	}
 
 	private int getDisplayMembersValue(Property prop) {
 		int showXXX = prop.getLongValue().intValue();
 		return showXXX;
 	}
+	
+	private long getPublicMembersValue(Property prop) {
+		String publicXXX = prop.getStringValue();
+		if(StringHelper.isLong(publicXXX)) {
+			return Long.parseLong(publicXXX);
+		}
+		return 0;
+	}
 
 	/**
 	 * @return The group property. Either red from database or newly created.
@@ -165,8 +192,9 @@ public class BusinessGroupPropertyDAO {
 		boolean showOwners = showOwners(sourceGPM);
 		boolean showPartips = showPartips(sourceGPM);
 		boolean showWaitingList = showWaitingList(sourceGPM);
-		updateDisplayMembers(targetGroup, showOwners, showPartips, showWaitingList);
+		boolean ownersPublic = this.isOwnersPublic(sourceGPM);
+		boolean partipsPublic = this.isPartipsPublic(sourceGPM);
+		boolean waitingListPublic = this.isWaitingListPublic(sourceGPM);
+		updateDisplayMembers(targetGroup, showOwners, showPartips, showWaitingList, ownersPublic, partipsPublic, waitingListPublic);
 	}
-
-
-}
+}
\ No newline at end of file
diff --git a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java
index 4f0ce1bff64..ee1d48ac702 100644
--- a/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java
+++ b/src/main/java/org/olat/group/manager/BusinessGroupServiceImpl.java
@@ -245,6 +245,9 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD
 		displayMembers.setShowOwners(businessGroupPropertyManager.showOwners(props));
 		displayMembers.setShowParticipants(businessGroupPropertyManager.showPartips(props));
 		displayMembers.setShowWaitingList(businessGroupPropertyManager.showWaitingList(props));
+		displayMembers.setOwnersPublic(businessGroupPropertyManager.isOwnersPublic(props));
+		displayMembers.setParticipantsPublic(businessGroupPropertyManager.isPartipsPublic(props));
+		displayMembers.setWaitingListPublic(businessGroupPropertyManager.isWaitingListPublic(props));
 		return displayMembers;
 	}
 
@@ -253,7 +256,10 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD
 		boolean showOwners = displayMembers.isShowOwners();
 		boolean showPartips = displayMembers.isShowParticipants();
 		boolean showWaitingList = displayMembers.isShowWaitingList();
-		businessGroupPropertyManager.updateDisplayMembers(group, showOwners, showPartips, showWaitingList);
+		boolean ownersPublic = displayMembers.isOwnersPublic();
+		boolean partipsPublic = displayMembers.isParticipantsPublic();
+		boolean waitingListPublic = displayMembers.isWaitingListPublic();
+		businessGroupPropertyManager.updateDisplayMembers(group, showOwners, showPartips, showWaitingList, ownersPublic, partipsPublic, waitingListPublic);
 	}
 
 	@Override
diff --git a/src/main/java/org/olat/group/model/DisplayMembers.java b/src/main/java/org/olat/group/model/DisplayMembers.java
index 8b4c11be3f7..bffc1e78f1d 100644
--- a/src/main/java/org/olat/group/model/DisplayMembers.java
+++ b/src/main/java/org/olat/group/model/DisplayMembers.java
@@ -29,6 +29,10 @@ public class DisplayMembers {
 	private boolean showParticipants;
 	private boolean showWaitingList;
 	
+	private boolean ownersPublic;
+	private boolean participantsPublic;
+	private boolean waitingListPublic;
+	
 	public DisplayMembers() {
 		//
 	}
@@ -62,4 +66,28 @@ public class DisplayMembers {
 	public void setShowWaitingList(boolean showWaitingList) {
 		this.showWaitingList = showWaitingList;
 	}
+
+	public boolean isOwnersPublic() {
+		return ownersPublic;
+	}
+
+	public void setOwnersPublic(boolean ownersPublic) {
+		this.ownersPublic = ownersPublic;
+	}
+
+	public boolean isParticipantsPublic() {
+		return participantsPublic;
+	}
+
+	public void setParticipantsPublic(boolean participantsPublic) {
+		this.participantsPublic = participantsPublic;
+	}
+
+	public boolean isWaitingListPublic() {
+		return waitingListPublic;
+	}
+
+	public void setWaitingListPublic(boolean waitingListPublic) {
+		this.waitingListPublic = waitingListPublic;
+	}
 }
diff --git a/src/main/java/org/olat/group/ui/BusinessGroupFormController.java b/src/main/java/org/olat/group/ui/BusinessGroupFormController.java
index 1aeaea92faf..0918a8a507b 100644
--- a/src/main/java/org/olat/group/ui/BusinessGroupFormController.java
+++ b/src/main/java/org/olat/group/ui/BusinessGroupFormController.java
@@ -208,6 +208,10 @@ public class BusinessGroupFormController extends FormBasicController {
 			uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());
 		}
 	}
+	
+	public void setAllowWaitingList(boolean allowWaitingList) {
+		enableWaitingList.setEnabled(allowWaitingList);
+	}
 
 	/**
 	 * @see org.olat.core.gui.components.form.flexible.impl.FormBasicController#validateFormLogic(org.olat.core.gui.UserRequest)
@@ -396,7 +400,7 @@ public class BusinessGroupFormController extends FormBasicController {
 	 * @return
 	 */
 	public boolean isWaitingListEnabled() {
-		return enableWaitingList.getSelectedKeys().size() != 0;
+		return enableWaitingList.isEnabled() && enableWaitingList.getSelectedKeys().size() != 0;
 	}
 
 	/**
diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditAccessController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditAccessController.java
index 0a8f9284cc3..ee29d7a89a0 100644
--- a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditAccessController.java
+++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditAccessController.java
@@ -31,7 +31,6 @@ import org.olat.core.gui.control.WindowControl;
 import org.olat.core.util.Util;
 import org.olat.group.BusinessGroup;
 import org.olat.resource.OLATResource;
-import org.olat.resource.OLATResourceManager;
 import org.olat.resource.accesscontrol.AccessControlModule;
 import org.olat.resource.accesscontrol.ui.AccessConfigurationController;
 
@@ -53,10 +52,11 @@ public class BusinessGroupEditAccessController extends FormBasicController {
 		super(ureq, wControl, LAYOUT_VERTICAL);
 		setTranslator(Util.createPackageTranslator(AccessConfigurationController.class, getLocale(), getTranslator()));
 		
-		AccessControlModule acModule = (AccessControlModule)CoreSpringFactory.getBean("acModule");
+		AccessControlModule acModule = CoreSpringFactory.getImpl(AccessControlModule.class);
 		if(acModule.isEnabled()) {
-			OLATResource resource = OLATResourceManager.getInstance().findResourceable(businessGroup);
-			configController = new AccessConfigurationController(ureq, wControl, resource, businessGroup.getName(), mainForm);
+			OLATResource resource = businessGroup.getResource();
+			boolean waitingList = businessGroup.getWaitingListEnabled();
+			configController = new AccessConfigurationController(ureq, wControl, resource, businessGroup.getName(), !waitingList, mainForm);
 			listenTo(configController);
 		}
 		
@@ -81,6 +81,15 @@ public class BusinessGroupEditAccessController extends FormBasicController {
 		uifactory.addFormSubmitButton("save", formLayout);
 	}
 	
+	public void updateBusinessGroup(BusinessGroup businessGroup) {
+		boolean waitingList = businessGroup.getWaitingListEnabled();
+		configController.setAllowPaymentMethod(!waitingList);
+	}
+	
+	public boolean isPaymentMethodInUse() {
+		return configController.isPaymentMethodInUse();
+	}
+	
 	@Override
 	protected void doDispose() {
 		//
@@ -93,4 +102,12 @@ public class BusinessGroupEditAccessController extends FormBasicController {
 		}
 		fireEvent(ureq, Event.DONE_EVENT);
 	}
+
+	@Override
+	protected void event(UserRequest ureq, Controller source, Event event) {
+		if(source == configController) {
+			fireEvent(ureq, event);
+		}
+		super.event(ureq, source, event);
+	}
 }
diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java
index 33836efd2a0..bba1b084943 100644
--- a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java
+++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditController.java
@@ -59,6 +59,7 @@ import org.olat.group.BusinessGroupService;
 import org.olat.group.GroupLoggingAction;
 import org.olat.group.ui.BGControllerFactory;
 import org.olat.instantMessaging.InstantMessagingModule;
+import org.olat.resource.accesscontrol.AccessControlModule;
 import org.olat.util.logging.activity.LoggingResourceable;
 
 /**
@@ -77,6 +78,7 @@ public class BusinessGroupEditController extends BasicController implements Cont
 	private boolean hasResources;
 	private BusinessGroup currBusinessGroup;
 	private final BusinessGroupService businessGroupService;
+	private final AccessControlModule acModule;
 
 	private TabbedPane tabbedPane;
 	private VelocityContainer mainVC;
@@ -112,6 +114,7 @@ public class BusinessGroupEditController extends BasicController implements Cont
 		addLoggingResourceable(LoggingResourceable.wrap(businessGroup));
 		
 		// Initialize managers
+		acModule = CoreSpringFactory.getImpl(AccessControlModule.class);
 		businessGroupService = CoreSpringFactory.getImpl(BusinessGroupService.class);
 
 		// Initialize translator:
@@ -177,7 +180,10 @@ public class BusinessGroupEditController extends BasicController implements Cont
 	private void setAllTabs(UserRequest ureq) {
 		hasResources = businessGroupService.hasResources(currBusinessGroup);
 		
+		tabAccessCtrl = getAccessController(ureq);
+
 		tabbedPane.removeAll();
+		editDetailsController.setAllowWaitingList(tabAccessCtrl == null || !tabAccessCtrl.isPaymentMethodInUse());
 		tabbedPane.addTab(translate("group.edit.tab.details"), editDetailsController.getInitialComponent());
 		tabbedPane.addTab(translate("group.edit.tab.collabtools"), collaborationToolsController.getInitialComponent());
 		
@@ -199,7 +205,6 @@ public class BusinessGroupEditController extends BasicController implements Cont
 			tabbedPane.addTab(translate("group.edit.tab.rights"), rightsController.getInitialComponent());
 		}
 
-		tabAccessCtrl = getAccessController(ureq);
 		if(tabAccessCtrl != null) {
 			tabbedPane.addTab(translate("group.edit.tab.accesscontrol"), tabAccessCtrl.getInitialComponent());
 		}
@@ -255,10 +260,13 @@ public class BusinessGroupEditController extends BasicController implements Cont
 	}
 	
 	private BusinessGroupEditAccessController getAccessController(UserRequest ureq) {
-		if(tabAccessCtrl == null) { 
+		if(tabAccessCtrl == null && acModule.isEnabled()) { 
 			tabAccessCtrl = new BusinessGroupEditAccessController(ureq, getWindowControl(), currBusinessGroup);
 	  	listenTo(tabAccessCtrl);
 		}
+		if(tabAccessCtrl != null) {
+			tabAccessCtrl.updateBusinessGroup(currBusinessGroup);
+		}
 		return tabAccessCtrl;
 	}
 
@@ -309,6 +317,10 @@ public class BusinessGroupEditController extends BasicController implements Cont
 				// do logging
 				ThreadLocalUserActivityLogger.log(GroupLoggingAction.GROUP_CONFIGURATION_CHANGED, getClass());
 			}
+		} 
+		else if (source == tabAccessCtrl) {
+			setAllTabs(ureq);
+			fireEvent(ureq, event);
 		} else if (source == resourceController) {
 			setAllTabs(ureq);
 			fireEvent(ureq, event);
diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditDetailsController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditDetailsController.java
index f288d975cfc..a3c63f078c6 100644
--- a/src/main/java/org/olat/group/ui/edit/BusinessGroupEditDetailsController.java
+++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupEditDetailsController.java
@@ -84,6 +84,10 @@ public class BusinessGroupEditDetailsController extends BasicController {
 		super.event(ureq, source, event);
 	}
 	
+	public void setAllowWaitingList(boolean allowWaitingList) {
+		editController.setAllowWaitingList(allowWaitingList);	
+	}
+	
 	/**
 	 * persist the updates
 	 */
diff --git a/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java b/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java
index dd5b77b0e1a..0f586cc61aa 100644
--- a/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java
+++ b/src/main/java/org/olat/group/ui/edit/BusinessGroupMembersController.java
@@ -88,11 +88,7 @@ public class BusinessGroupMembersController extends BasicController {
 		dmsForm = new DisplayMemberSwitchForm(ureq, getWindowControl(), true, true, hasWaitingList);
 		listenTo(dmsForm);
 		// set if the checkboxes are checked or not.
-		dmsForm.setShowOwnersChecked(displayMembers.isShowOwners());
-		dmsForm.setShowPartipsChecked(displayMembers.isShowParticipants());
-		if (hasWaitingList) {
-			dmsForm.setShowWaitingListChecked(displayMembers.isShowWaitingList());
-		}
+		dmsForm.setDisplayMembers(displayMembers);
 		
 		mainVC.put("displayMembers", dmsForm.getInitialComponent());
 		Roles roles = ureq.getUserSession().getRoles();
@@ -168,8 +164,7 @@ public class BusinessGroupMembersController extends BasicController {
 	protected void event(UserRequest ureq, Controller source, Event event) {
 		if (source == dmsForm) {
 			if(event == Event.CHANGED_EVENT) {
-				businessGroupService.updateDisplayMembers(businessGroup,
-						new DisplayMembers(dmsForm.getShowOwners(), dmsForm.getShowPartipiciants(), dmsForm.getShowWaitingList()));
+				businessGroupService.updateDisplayMembers(businessGroup, dmsForm.getDisplayMembers());
 				// notify current active users of this business group
 				BusinessGroupModifiedEvent.fireModifiedGroupEvents(BusinessGroupModifiedEvent.CONFIGURATION_MODIFIED_EVENT, businessGroup, null);
 				// do loggin
diff --git a/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java b/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java
index d628dcba000..5801d6377bc 100644
--- a/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java
+++ b/src/main/java/org/olat/group/ui/edit/DisplayMemberSwitchForm.java
@@ -34,6 +34,7 @@ import org.olat.core.gui.components.form.flexible.impl.FormEvent;
 import org.olat.core.gui.control.Controller;
 import org.olat.core.gui.control.Event;
 import org.olat.core.gui.control.WindowControl;
+import org.olat.group.model.DisplayMembers;
 
 
 
@@ -50,6 +51,7 @@ import org.olat.core.gui.control.WindowControl;
 public class DisplayMemberSwitchForm extends FormBasicController {
 
 	private SelectionElement showOwners, showPartips, showWaitingList;
+	private SelectionElement openOwners, openPartips, openWaitingList;
 	private boolean hasOwners, hasPartips, hasWaitingList;
 
 	/**
@@ -66,70 +68,35 @@ public class DisplayMemberSwitchForm extends FormBasicController {
 		
 		initForm(ureq);
 	}
-
-	/**
-	 * wheter the Show Owners checkbox is checked or not
-	 * 
-	 * @return boolean
-	 */
-	public boolean getShowOwners() {
-		if (showOwners == null) return false;
-		return showOwners.isSelected(0);
-	}
-
-	/**
-	 * wheter the Show Partipicants checkbox is checked or not
-	 * 
-	 * @return boolean
-	 */
-	public boolean getShowPartipiciants() {
-		if (showPartips == null) return false;
-		return showPartips.isSelected(0);
-	}
-
-	/**
-	 * whether the Show WaitingList checkbox is checked or not
-	 * 
-	 * @return boolean
-	 */
-	public boolean getShowWaitingList() {
-		if (showWaitingList == null) return false;
-		return showWaitingList.isSelected(0);
-	}
-
-	/**
-	 * wheter the Show Owners checkbox is checked or not
-	 * 
-	 * @param show
-	 */
-	public void setShowOwnersChecked(boolean show) {
-		showOwners.select("xx", show);
-	}
-
-	/**
-	 * wheter the Show Partipicants checkbox is checked or not
-	 * 
-	 * @param show
-	 */
-	public void setShowPartipsChecked(boolean show) {
-		showPartips.select("xx", show);
+	
+	public DisplayMembers getDisplayMembers() {
+		DisplayMembers displayMembers = new DisplayMembers();
+		displayMembers.setShowOwners(showOwners.isSelected(0));
+		displayMembers.setShowParticipants(showPartips.isSelected(0));
+		displayMembers.setShowWaitingList(showWaitingList.isVisible() && showWaitingList.isEnabled() && showWaitingList.isSelected(0));
+		displayMembers.setOwnersPublic(openOwners.isSelected(0));
+		displayMembers.setParticipantsPublic(openPartips.isSelected(0));
+		displayMembers.setWaitingListPublic(openWaitingList.isVisible() && openWaitingList.isEnabled() && openWaitingList.isSelected(0));
+		return displayMembers;
 	}
-
-	/**
-	 * wheter the Show WaitingList checkbox is checked or not
-	 * 
-	 * @param show
-	 */
-	public void setShowWaitingListChecked(boolean show) {
-		showWaitingList.select("xx", show);
+	
+	public void setDisplayMembers(DisplayMembers displayMembers) {
+		showOwners.select("xx", displayMembers.isShowOwners());
+		showPartips.select("xx", displayMembers.isShowParticipants());
+		showWaitingList.select("xx", displayMembers.isShowWaitingList());
+		openOwners.select("xx", displayMembers.isOwnersPublic());
+		openPartips.select("xx", displayMembers.isParticipantsPublic());
+		openWaitingList.select("xx", displayMembers.isWaitingListPublic());
 	}
-
+	
 	public void setWaitingListReadOnly(boolean b) {
 		showWaitingList.setEnabled(b);
+		openWaitingList.setEnabled(b);
 	}
 	
 	public void setWaitingListVisible(boolean b) {
 		showWaitingList.setVisible(b);
+		openWaitingList.setVisible(b);
 	}
 
 	@Override
@@ -151,10 +118,20 @@ public class DisplayMemberSwitchForm extends FormBasicController {
 		showPartips.setVisible(hasPartips);
 		showWaitingList = uifactory.addCheckboxesVertical("ShowWaitingList", "chkBox.show.waitingList", formLayout, new String[]{"xx"}, new String[]{""}, null, 1);
 		showWaitingList.setVisible(hasWaitingList);
-		
+
+		openOwners = uifactory.addCheckboxesVertical("OpenOwners", "chkBox.open.owners", formLayout, new String[]{"xx"}, new String[]{""}, null, 1);
+		openOwners.setVisible(hasOwners);
+		openPartips = uifactory.addCheckboxesVertical("OpenPartips", "chkBox.open.partips", formLayout, new String[]{"xx"}, new String[]{""}, null, 1);
+		openPartips.setVisible(hasPartips);
+		openWaitingList = uifactory.addCheckboxesVertical("OpenWaitingList", "chkBox.open.waitingList", formLayout, new String[]{"xx"}, new String[]{""}, null, 1);
+		openWaitingList.setVisible(hasWaitingList);
+
 		showOwners.addActionListener(this, FormEvent.ONCLICK);
 		showPartips.addActionListener(this, FormEvent.ONCLICK);
 		showWaitingList.addActionListener(this, FormEvent.ONCLICK);
+		openOwners.addActionListener(this, FormEvent.ONCLICK);
+		openPartips.addActionListener(this, FormEvent.ONCLICK);
+		openWaitingList.addActionListener(this, FormEvent.ONCLICK);
 	}
 
 	@Override
diff --git a/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_de.properties
index ebc9b36af70..d20bbc7fbe9 100644
--- a/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/group/ui/edit/_i18n/LocalStrings_de.properties
@@ -111,6 +111,9 @@ chelp.tools.title=Konfiguration kollaborativer Werkzeuge
 chkBox.show.owners=Mitglieder sehen Besitzer
 chkBox.show.partips=Mitglieder sehen Teilnehmer
 chkBox.show.waitingList=Mitglieder sehen Warteliste
+chkBox.open.owners=Alle sehen Besitzer
+chkBox.open.partips=Alle sehen Teilnehmer
+chkBox.open.waitingList=Alle sehen Warteliste
 chkBox.open=Gruppe für Buchung in Gruppenbereich ver\u00F6ffentlichen
 cmd.addresource=Kurs hinzuf\u00FCgen
 error.message.locked=Diese Gruppe wird im Moment vom Benutzer {0} ({1}) ver\u00E4ndert und ist daher gesperrt. Bitte versuchen Sie es sp\u00E4ter noch einmal.
diff --git a/src/main/java/org/olat/group/ui/homepage/GroupInfoMainController.java b/src/main/java/org/olat/group/ui/homepage/GroupInfoMainController.java
index 81898bc9f3c..6a1682abf62 100644
--- a/src/main/java/org/olat/group/ui/homepage/GroupInfoMainController.java
+++ b/src/main/java/org/olat/group/ui/homepage/GroupInfoMainController.java
@@ -206,7 +206,7 @@ public class GroupInfoMainController extends MainLayoutBasicController implement
 		rootNode.setDelegate(childNode);
 		
 		DisplayMembers members = businessGroupService.getDisplayMembers(businessGroup);
-		if(members.isShowOwners() || members.isShowParticipants()) {
+		if(members.isOwnersPublic() || members.isParticipantsPublic()) {
 			childNode = new GenericTreeNode();
 			childNode.setTitle(translate("main.menu.members"));
 			childNode.setUserObject(COMMAND_MENU_GROUPMEMBERS);
diff --git a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java
index b4888a876e6..85062ab7bf5 100644
--- a/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java
+++ b/src/main/java/org/olat/group/ui/run/BusinessGroupMainRunController.java
@@ -92,7 +92,6 @@ import org.olat.portfolio.PortfolioModule;
 import org.olat.repository.RepositoryEntry;
 import org.olat.repository.RepositoryTableModel;
 import org.olat.resource.OLATResource;
-import org.olat.resource.OLATResourceManager;
 import org.olat.resource.accesscontrol.ACService;
 import org.olat.resource.accesscontrol.ACUIFactory;
 import org.olat.resource.accesscontrol.AccessControlModule;
@@ -660,7 +659,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
 	//fxdiff VCRP-1,2: access control of resources
 	private void doAccessControlHistory(UserRequest ureq) {
 		removeAsListenerAndDispose(bgACHistoryCtrl);
-		OLATResource resource = OLATResourceManager.getInstance().findResourceable(businessGroup);
+		OLATResource resource = businessGroup.getResource();
 		bgACHistoryCtrl = ACUIFactory.createOrdersAdminController(ureq, getWindowControl(), resource);
 		listenTo(bgACHistoryCtrl);
 		mainPanel.setContent(bgACHistoryCtrl.getInitialComponent());
@@ -852,7 +851,7 @@ public class BusinessGroupMainRunController extends MainLayoutBasicController im
 				// reset business group property manager
 				// update reference to update business group object
 				businessGroup = businessGroupService.loadBusinessGroup(this.businessGroup);
-				main.contextPut("BuddyGroup", this.businessGroup);
+				main.contextPut("BuddyGroup", businessGroup);
 				TreeModel trMdl = buildTreeModel();
 				bgTree.setTreeModel(trMdl);
 				if (bgEditCntrllr == null) {
diff --git a/src/main/java/org/olat/repository/controllers/RepositoryEditPropertiesController.java b/src/main/java/org/olat/repository/controllers/RepositoryEditPropertiesController.java
index 1aeea6f5620..ca2d2f444dd 100644
--- a/src/main/java/org/olat/repository/controllers/RepositoryEditPropertiesController.java
+++ b/src/main/java/org/olat/repository/controllers/RepositoryEditPropertiesController.java
@@ -164,7 +164,7 @@ public class RepositoryEditPropertiesController extends BasicController implemen
 		editproptabpubVC.put("proppupform", propPupForm.getInitialComponent());
 		
 		//fxdiff VCRP-1,2: access control of resources
-	  acCtr = new AccessConfigurationController(ureq, getWindowControl(), repositoryEntry.getOlatResource(), repositoryEntry.getDisplayname());
+	  acCtr = new AccessConfigurationController(ureq, getWindowControl(), repositoryEntry.getOlatResource(), repositoryEntry.getDisplayname(), true);
 	  int access = propPupForm.getAccess();
 	  if(access == RepositoryEntry.ACC_USERS || access == RepositoryEntry.ACC_USERS_GUESTS) {
 	  	editproptabpubVC.put("accesscontrol", acCtr.getInitialComponent());
diff --git a/src/main/java/org/olat/resource/accesscontrol/manager/ACFrontendManager.java b/src/main/java/org/olat/resource/accesscontrol/manager/ACFrontendManager.java
index 0df63ad5071..e99292d812a 100644
--- a/src/main/java/org/olat/resource/accesscontrol/manager/ACFrontendManager.java
+++ b/src/main/java/org/olat/resource/accesscontrol/manager/ACFrontendManager.java
@@ -315,7 +315,7 @@ public class ACFrontendManager extends BasicManager implements ACService {
 			return true;//don't need reservation
 		} else if("BusinessGroup".equals(resourceType)) {
 			final BusinessGroup group = businessGroupService.loadBusinessGroup(resource);
-			if(group.getWaitingListEnabled() != null && group.getWaitingListEnabled() != null) {
+			if(group.getWaitingListEnabled() != null && group.getWaitingListEnabled().booleanValue()) {
 				return true; //don't need reservation
 			}
 			if(group.getMaxParticipants() == null && group.getMaxParticipants() <= 0) {
diff --git a/src/main/java/org/olat/resource/accesscontrol/method/AccessMethodHandler.java b/src/main/java/org/olat/resource/accesscontrol/method/AccessMethodHandler.java
index 1dc7ec1a738..3fed2228662 100644
--- a/src/main/java/org/olat/resource/accesscontrol/method/AccessMethodHandler.java
+++ b/src/main/java/org/olat/resource/accesscontrol/method/AccessMethodHandler.java
@@ -48,6 +48,8 @@ import org.olat.resource.accesscontrol.ui.FormController;
  */
 public interface AccessMethodHandler {
 	
+	public boolean isPaymentMethod();
+	
 	public String getType();
 	
 	public String getMethodName(Locale locale);
diff --git a/src/main/java/org/olat/resource/accesscontrol/model/ResourceReservationImpl.java b/src/main/java/org/olat/resource/accesscontrol/model/ResourceReservationImpl.java
index 4e0dc4c5c63..a47971b6c54 100644
--- a/src/main/java/org/olat/resource/accesscontrol/model/ResourceReservationImpl.java
+++ b/src/main/java/org/olat/resource/accesscontrol/model/ResourceReservationImpl.java
@@ -23,7 +23,6 @@ import java.util.Date;
 
 import org.olat.core.commons.persistence.PersistentObject;
 import org.olat.core.id.Identity;
-import org.olat.core.id.ModifiedInfo;
 import org.olat.resource.OLATResource;
 
 /**
diff --git a/src/main/java/org/olat/resource/accesscontrol/provider/free/FreeAccessHandler.java b/src/main/java/org/olat/resource/accesscontrol/provider/free/FreeAccessHandler.java
index 48ec8c70c66..544e31eea0c 100644
--- a/src/main/java/org/olat/resource/accesscontrol/provider/free/FreeAccessHandler.java
+++ b/src/main/java/org/olat/resource/accesscontrol/provider/free/FreeAccessHandler.java
@@ -58,6 +58,11 @@ public class FreeAccessHandler implements AccessMethodHandler {
 	public static final String METHOD_TYPE = "free.method";
 	public static final String METHOD_CSS_CLASS = "b_access_method_free";
 
+	@Override
+	public boolean isPaymentMethod() {
+		return false;
+	}
+
 	@Override
 	public String getType() {
 		return METHOD_TYPE;
diff --git a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/PaypalAccessHandler.java b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/PaypalAccessHandler.java
index 4c83cd3388b..447f87cf9e8 100644
--- a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/PaypalAccessHandler.java
+++ b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/PaypalAccessHandler.java
@@ -61,6 +61,11 @@ public class PaypalAccessHandler implements AccessMethodHandler {
 	public static final String METHOD_TYPE = "paypal.method";
 	public static final String METHOD_CSS_CLASS = "fx_access_method_paypal";
 
+	@Override
+	public boolean isPaymentMethod() {
+		return true;
+	}
+
 	@Override
 	public String getType() {
 		return METHOD_TYPE;
diff --git a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/_spring/paypalContext.xml b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/_spring/paypalContext.xml
index 55c9fdb1776..f4161f9c97f 100644
--- a/src/main/java/org/olat/resource/accesscontrol/provider/paypal/_spring/paypalContext.xml
+++ b/src/main/java/org/olat/resource/accesscontrol/provider/paypal/_spring/paypalContext.xml
@@ -10,7 +10,8 @@
 				depends-on="org.olat.core.util.WebappHelper">
 				<constructor-arg index="0" ref="coordinatorManager" />
 				<constructor-arg index="1" ref="paypalModule" />
-				<constructor-arg index="2" value="true" />
+				<constructor-arg index="2" value="com.frentix.olat.accesscontrol.paypal.PaypalModule" />
+				<constructor-arg index="3" value="true" />
 			</bean>
 		</property>
   </bean>
diff --git a/src/main/java/org/olat/resource/accesscontrol/provider/token/TokenAccessHandler.java b/src/main/java/org/olat/resource/accesscontrol/provider/token/TokenAccessHandler.java
index e1f1fac3935..539bc6bacce 100644
--- a/src/main/java/org/olat/resource/accesscontrol/provider/token/TokenAccessHandler.java
+++ b/src/main/java/org/olat/resource/accesscontrol/provider/token/TokenAccessHandler.java
@@ -59,6 +59,11 @@ public class TokenAccessHandler implements AccessMethodHandler {
 	
 	public static final String METHOD_TYPE = "token.method";
 	public static final String METHOD_CSS_CLASS = "b_access_method_token";
+	
+	@Override
+	public boolean isPaymentMethod() {
+		return false;
+	}
 
 	@Override
 	public String getType() {
diff --git a/src/main/java/org/olat/resource/accesscontrol/ui/AccessConfigurationController.java b/src/main/java/org/olat/resource/accesscontrol/ui/AccessConfigurationController.java
index 221a037bec2..fc8b79da6df 100644
--- a/src/main/java/org/olat/resource/accesscontrol/ui/AccessConfigurationController.java
+++ b/src/main/java/org/olat/resource/accesscontrol/ui/AccessConfigurationController.java
@@ -83,12 +83,15 @@ public class AccessConfigurationController extends FormBasicController {
 	
 	private final boolean embbed;
 	private final boolean emptyConfigGrantsFullAccess;
+	private boolean allowPaymentMethod;
 	
-	public AccessConfigurationController(UserRequest ureq, WindowControl wControl, OLATResource resource, String displayName) {
+	public AccessConfigurationController(UserRequest ureq, WindowControl wControl, OLATResource resource,
+			String displayName, boolean allowPaymentMethod) {
 		super(ureq, wControl, "access_configuration");
 		
 		this.resource = resource;
 		this.displayName = displayName;
+		this.allowPaymentMethod = allowPaymentMethod;
 		acModule = (AccessControlModule)CoreSpringFactory.getBean("acModule");
 		acService = CoreSpringFactory.getImpl(ACService.class);
 		embbed = false;
@@ -97,12 +100,14 @@ public class AccessConfigurationController extends FormBasicController {
 		initForm(ureq);
 	}
 		
-	public AccessConfigurationController(UserRequest ureq, WindowControl wControl, OLATResource resource, String displayName, Form form) {
+	public AccessConfigurationController(UserRequest ureq, WindowControl wControl, OLATResource resource,
+			String displayName, boolean allowPaymentMethod, Form form) {
 		super(ureq, wControl, FormBasicController.LAYOUT_CUSTOM, "access_configuration", form);
 		
 		this.resource = resource;
 		this.displayName = displayName;
-		acModule = (AccessControlModule)CoreSpringFactory.getBean("acModule");
+		this.allowPaymentMethod = allowPaymentMethod;
+		acModule = CoreSpringFactory.getImpl(AccessControlModule.class);
 		acService = CoreSpringFactory.getImpl(ACService.class);
 		embbed = true;
 		emptyConfigGrantsFullAccess = false;
@@ -143,6 +148,18 @@ public class AccessConfigurationController extends FormBasicController {
 		confControllerContainer.contextPut("emptyConfigGrantsFullAccess", Boolean.valueOf(emptyConfigGrantsFullAccess));		
 	}
 	
+	public void setAllowPaymentMethod(boolean allowPayment) {
+		this.allowPaymentMethod = allowPayment;
+	}
+	
+	public boolean isPaymentMethodInUse() {
+		boolean paymentMethodInUse = false;
+		for(AccessInfo info:confControllers) {
+			paymentMethodInUse |= info.isPaymentMethod();
+		}
+		return paymentMethodInUse;
+	}
+	
 	@Override
 	protected void doDispose() {
 		//
@@ -165,6 +182,7 @@ public class AccessConfigurationController extends FormBasicController {
 				OfferAccess newLink = newMethodCtrl.commitChanges();
 				newLink = acService.saveOfferAccess(newLink);
 				addConfiguration(newLink);
+				fireEvent(ureq, Event.CHANGED_EVENT);
 			}
 			cmc.deactivate();
 			removeAsListenerAndDispose(newMethodCtrl);
@@ -228,6 +246,10 @@ public class AccessConfigurationController extends FormBasicController {
 		List<AccessMethod> methods = acService.getAvailableMethods(getIdentity(), ureq.getUserSession().getRoles());
 		for(AccessMethod method:methods) {
 			AccessMethodHandler handler = acModule.getAccessMethodHandler(method.getType());
+			if(handler.isPaymentMethod() && !allowPaymentMethod) {
+				continue;
+			}
+			
 			Link add = LinkFactory.createLink("create." + handler.getType(), mapCreateVC, this);
 			add.setCustomDisplayText(handler.getMethodName(getLocale()));
 			add.setUserObject(method);
@@ -257,7 +279,7 @@ public class AccessConfigurationController extends FormBasicController {
 	
 	protected void addConfiguration(OfferAccess link) {
 		AccessMethodHandler handler = acModule.getAccessMethodHandler(link.getMethod().getType());
-		AccessInfo infos = new AccessInfo(handler.getMethodName(getLocale()), null, link);
+		AccessInfo infos = new AccessInfo(handler.getMethodName(getLocale()), handler.isPaymentMethod(), null, link);
 		confControllers.add(infos);
 
 		DateChooser dateFrom = uifactory.addDateChooser("from_" + link.getKey(), "from", "", confControllerContainer);
@@ -303,9 +325,11 @@ public class AccessConfigurationController extends FormBasicController {
 		private String name;
 		private String infos;
 		private OfferAccess link;
+		private final boolean paymentMethod;
 		
-		public AccessInfo(String name, String infos, OfferAccess link) {
+		public AccessInfo(String name, boolean paymentMethod, String infos, OfferAccess link) {
 			this.name = name;
+			this.paymentMethod = paymentMethod;
 			this.infos = infos;
 			this.link = link;
 		}
@@ -318,6 +342,10 @@ public class AccessConfigurationController extends FormBasicController {
 			this.name = name;
 		}
 		
+		public boolean isPaymentMethod() {
+			return paymentMethod;
+		}
+
 		public String getInfos() {
 			if(infos == null && link.getOffer() != null) {
 				OfferImpl casted = (OfferImpl)link.getOffer();
diff --git a/src/main/java/org/olat/search/service/indexer/group/GroupIndexer.java b/src/main/java/org/olat/search/service/indexer/group/GroupIndexer.java
index f52c1cc7203..67e6cdc0474 100644
--- a/src/main/java/org/olat/search/service/indexer/group/GroupIndexer.java
+++ b/src/main/java/org/olat/search/service/indexer/group/GroupIndexer.java
@@ -41,7 +41,6 @@ import org.olat.core.util.resource.OresHelper;
 import org.olat.group.BusinessGroup;
 import org.olat.group.BusinessGroupService;
 import org.olat.resource.OLATResource;
-import org.olat.resource.OLATResourceManager;
 import org.olat.resource.accesscontrol.ACService;
 import org.olat.resource.accesscontrol.AccessControlModule;
 import org.olat.search.service.SearchResourceContext;
@@ -113,7 +112,7 @@ public class GroupIndexer extends AbstractHierarchicalIndexer {
 			AccessControlModule acModule = (AccessControlModule)CoreSpringFactory.getBean("acModule");
 			if(acModule.isEnabled()) {
 				ACService acService = CoreSpringFactory.getImpl(ACService.class);
-				OLATResource resource = OLATResourceManager.getInstance().findResourceable(group);
+				OLATResource resource = group.getResource();
 				if(acService.isResourceAccessControled(resource, new Date())) {
 					return super.checkAccess(contextEntry, businessControl, identity, roles)
 							&& super.checkAccess(businessControl, identity, roles);
diff --git a/src/main/resources/database/mysql/setupDatabase.sql b/src/main/resources/database/mysql/setupDatabase.sql
index 86744e93cd3..6b3eac25014 100644
--- a/src/main/resources/database/mysql/setupDatabase.sql
+++ b/src/main/resources/database/mysql/setupDatabase.sql
@@ -1307,7 +1307,7 @@ alter table o_ac_order ENGINE = InnoDB;
 alter table o_ac_order_part ENGINE = InnoDB;
 alter table o_ac_order_line ENGINE = InnoDB;
 alter table o_ac_transaction ENGINE = InnoDB;
-alter table o_ac_offer ENGINE = InnoDB;
+alter table o_ac_reservation ENGINE = InnoDB;
 alter table o_ac_paypal_transaction ENGINE = InnoDB;
 alter table o_as_eff_statement ENGINE = InnoDB;
 alter table o_as_user_course_infos ENGINE = InnoDB;
diff --git a/src/main/resources/database/postgresql/setupDatabase.sql b/src/main/resources/database/postgresql/setupDatabase.sql
index 94a02dff1c1..fed48bb3bbe 100644
--- a/src/main/resources/database/postgresql/setupDatabase.sql
+++ b/src/main/resources/database/postgresql/setupDatabase.sql
@@ -798,12 +798,12 @@ create table o_ac_transaction (
 );
 
 create table  if not exists o_ac_reservation (
-   reservation_id bigint NOT NULL,
-   creationdate datetime,
-   lastmodified datetime,
-   version mediumint unsigned not null,
-   fk_identity bigint not null,
-   fk_resource bigint not null,
+   reservation_id int8 NOT NULL,
+   creationdate timestamp,
+   lastmodified timestamp,
+   version int4 not null,
+   fk_identity int8 not null,
+   fk_resource int8 not null,
    primary key (reservation_id)
 );
 
diff --git a/src/main/resources/serviceconfig/olat.properties b/src/main/resources/serviceconfig/olat.properties
index 70d01246ac3..27f7d3e0004 100644
--- a/src/main/resources/serviceconfig/olat.properties
+++ b/src/main/resources/serviceconfig/olat.properties
@@ -200,7 +200,7 @@ group.user.create.values=true,false
 group.author.create=true
 group.author.create.values=true,false
 # show the contact form in the business group card.
-group.card.contact=never
+group.card.contact=groupconfig
 group.card.contact.values=never,always,groupconfig
 
 ####################################################
-- 
GitLab