made can_manage() abstract in baseModule to save memory

This commit is contained in:
Roland Gruber 2014-04-20 13:00:42 +00:00
parent 6cd040e9c1
commit 11e6a3fb66
29 changed files with 265 additions and 62 deletions

View file

@ -38,6 +38,15 @@ class ldapPublicKey extends baseModule {
/** session variable for existing keys in self service */
const SESS_KEY_LIST = 'ldapPublicKey_keyList';
/**
* Returns true if this module can manage accounts of the current type, otherwise false.
*
* @return boolean true if module fits
*/
public function can_manage() {
return in_array($this->get_scope(), array('user'));
}
/**
* Returns meta data that is interpreted by parent class
*
@ -49,8 +58,6 @@ class ldapPublicKey extends baseModule {
$return = array();
// icon
$return['icon'] = 'keyBig.png';
// manages host accounts
$return["account_types"] = array("user");
// alias name
$return["alias"] = _("SSH public key");
// module dependencies