diff --git a/lam/docs/devel/upgrade.htm b/lam/docs/devel/upgrade.htm
index 6f7eaa32..da6f711b 100644
--- a/lam/docs/devel/upgrade.htm
+++ b/lam/docs/devel/upgrade.htm
@@ -10,6 +10,7 @@
+
Upgrade notes
@@ -27,8 +28,16 @@ This is a list of API changes for all LAM releases.
+3.8 -> 3.9
Module interface:
+
+
+- supportsAdminInterface(): Can be used mark modules that only support the self service.
+
+
+
3.7 -> 3.8
-
Type interface:
+
+Type interface:
- getTitleBarTitle()/getTitleBarSubtitle(): changed
parameter from attribute array to accountContainer object.
diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc
index 2cc8bb65..1a657409 100644
--- a/lam/lib/baseModule.inc
+++ b/lam/lib/baseModule.inc
@@ -1409,6 +1409,18 @@ abstract class baseModule {
// modules that use AJAX need to implement this function
}
+ /**
+ * Specifies if this module supports the LAM admin interface.
+ * The LAM admin interface are the pages that allow to manage e.g. users and groups.
+ * In contrast there is also the LAM self service interface. Most modules support
+ * the admin interface.
+ *
+ * @return boolean support admin interface
+ */
+ public static function supportsAdminInterface() {
+ return true;
+ }
+
// helper functions
diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc
index a93061e1..b404e0a2 100644
--- a/lam/lib/modules.inc
+++ b/lam/lib/modules.inc
@@ -247,9 +247,10 @@ function check_module_conflicts($selected, $deps) {
* Returns an array with all available user module names
*
* @param string $scope account type (user, group, host)
+* @param boolean $mustSupportAdminInterface module must support LAM admin interface (default: false)
* @return array list of possible modules
*/
-function getAvailableModules($scope) {
+function getAvailableModules($scope, $mustSupportAdminInterface = false) {
$dirname = substr(__FILE__, 0, strlen(__FILE__) - 12) . "/modules";
$dir = dir($dirname);
$return = array();
@@ -258,7 +259,12 @@ function getAvailableModules($scope) {
if ((substr($entry, strlen($entry) - 4, 4) == '.inc') && is_file($dirname . '/'.$entry)) {
$entry = substr($entry, 0, strpos($entry, '.'));
$temp = new $entry($scope);
- if ($temp->can_manage()) $return[] = $entry;
+ if ($mustSupportAdminInterface && !$entry::supportsAdminInterface()) {
+ continue;
+ }
+ if ($temp->can_manage()) {
+ $return[] = $entry;
+ }
}
return $return;
}
diff --git a/lam/templates/config/confmodules.php b/lam/templates/config/confmodules.php
index f8c195b5..87ba89a1 100644
--- a/lam/templates/config/confmodules.php
+++ b/lam/templates/config/confmodules.php
@@ -237,7 +237,7 @@ function config_showAccountModules($scope, $title, &$container) {
$conf = &$_SESSION['conf_config'];
$typeSettings = $conf->get_typeSettings();
// account modules
- $available = getAvailableModules($scope);
+ $available = getAvailableModules($scope, true);
$selected = $typeSettings['modules_' . $scope];
if (isset($selected) && ($selected != '')) {
$selected = explode(',', $selected);
@@ -332,7 +332,7 @@ function checkInput() {
$accountTypes = $conf->get_ActiveTypes();
for ($t = 0; $t < sizeof($accountTypes); $t++) {
$scope = $accountTypes[$t];
- $available = getAvailableModules($scope);
+ $available = getAvailableModules($scope, true);
$selected_temp = $typeSettings['modules_' . $scope];
if (isset($selected_temp)) $selected_temp = explode(',', $selected_temp);
$selected = array();