2 commits - lib/Auth lib/Auth.php lib/locale
Aleksander Machniak
machniak at kolabsys.com
Wed Oct 3 14:29:22 CEST 2012
lib/Auth.php | 5 +++++
lib/Auth/LDAP.php | 38 +++++++++++++++++---------------------
lib/locale/en_US.php | 15 +++++++++------
3 files changed, 31 insertions(+), 27 deletions(-)
New commits:
commit f6b25899f7d279ce58599781e094bf256ac49c4d
Author: Aleksander Machniak <alec at alec.pl>
Date: Wed Oct 3 14:29:05 2012 +0200
Implement role.delete
diff --git a/lib/Auth.php b/lib/Auth.php
index 19b3857..3e0b9bd 100644
--- a/lib/Auth.php
+++ b/lib/Auth.php
@@ -366,6 +366,11 @@ class Auth {
return $this->auth_instance()->role_edit($role, $attributes, $typeid);
}
+ public function role_delete($role)
+ {
+ return $this->auth_instance()->role_delete($role);
+ }
+
public function role_find_by_attribute($attribute)
{
return $this->auth_instance()->role_find_by_attribute($attribute);
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index e7a2656..7e0ecd4 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -270,13 +270,7 @@ class LDAP extends Net_LDAP3 {
}
public function group_delete($group) {
- $group_dn = $this->entry_dn($group);
-
- if (!$group_dn) {
- return false;
- }
-
- return $this->delete_entry($group_dn);
+ return $this->entry_delete($group);
}
public function group_edit($group, $attributes, $typeid = null) {
@@ -607,13 +601,7 @@ class LDAP extends Net_LDAP3 {
}
public function resource_delete($resource) {
- $resource_dn = $this->entry_dn($resource);
-
- if (!$resource_dn) {
- return false;
- }
-
- return $this->delete_entry($resource_dn);
+ return $this->entry_delete($resource);
}
public function resource_edit($resource, $attributes, $typeid = null) {
@@ -704,6 +692,10 @@ class LDAP extends Net_LDAP3 {
return $this->modify_entry($_role_dn, $_role[$_role_dn], $attributes);
}
+ public function role_delete($role) {
+ return $this->entry_delete($role);
+ }
+
public function role_find_by_attribute($attribute) {
$this->_log(LOG_DEBUG, "Finding role by attribute: " . var_export($attribute, TRUE));
@@ -798,13 +790,7 @@ class LDAP extends Net_LDAP3 {
}
public function user_delete($user) {
- $user_dn = $this->entry_dn($user);
-
- if (!$user_dn) {
- return false;
- }
-
- return $this->delete_entry($user_dn);
+ return $this->entry_delete($user);
}
public function user_info($user, $attributes = array('*')) {
@@ -832,6 +818,16 @@ class LDAP extends Net_LDAP3 {
return $this->entry_find_by_attribute($attribute);
}
+ protected function entry_delete($entry) {
+ $entry_dn = $this->entry_dn($entry);
+
+ if (!$entry_dn) {
+ return false;
+ }
+
+ return $this->delete_entry($entry_dn);
+ }
+
public function _config_get($key, $default = NULL) {
$key_parts = explode("_", $key);
$this->_log(LOG_DEBUG, var_export($key_parts));
commit 3e2360e92990dff438481f69b941238db4181353
Author: Aleksander Machniak <alec at alec.pl>
Date: Wed Oct 3 14:11:11 2012 +0200
Fix/add some translation
diff --git a/lib/locale/en_US.php b/lib/locale/en_US.php
index 23d81d4..9e3301b 100644
--- a/lib/locale/en_US.php
+++ b/lib/locale/en_US.php
@@ -33,10 +33,11 @@ $LANG['debug'] = 'Debug info';
$LANG['deleting'] = 'Deleting data...';
$LANG['domain.add'] = 'Add Domain';
-$LANG['domain.add.success'] = 'Added domain';
+$LANG['domain.add.success'] = 'Domain created successfully.';
$LANG['domain.associateddomain'] = 'Domain name(s)';
+$LANG['domain.delete.success'] = 'Domain deleted successfully.';
$LANG['domain.edit'] = 'Edit domain';
-$LANG['domain.edit.success'] = 'Domain updated';
+$LANG['domain.edit.success'] = 'Domain updated successfully.';
$LANG['domain.inetdomainbasedn'] = 'Custom Root DN(s)';
$LANG['domain.list'] = 'Domains List';
$LANG['domain.o'] = 'Organization';
@@ -90,12 +91,12 @@ $LANG['password.generate'] = 'Generate password';
$LANG['reqtime'] = 'Request time: $1 sec.';
$LANG['resource.add'] = 'Add Resource';
-$LANG['resource.add.success'] = 'Added Resource';
+$LANG['resource.add.success'] = 'Resource created successfully.';
$LANG['resource.cn'] = 'Name';
$LANG['resource.delete'] = 'Delete Resource';
-$LANG['resource.delete.success'] = 'Successfully deleted Resource';
+$LANG['resource.delete.success'] = 'Resource deleted successfully.';
$LANG['resource.edit'] = 'Edit Resource';
-$LANG['resource.edit.success'] = 'Successfully updated Resource';
+$LANG['resource.edit.success'] = 'Resource updated successfully.';
$LANG['resource.kolabtargetfolder'] = 'Target Folder';
$LANG['resource.list'] = 'Resource (Collection) List';
$LANG['resource.mail'] = 'Mail Address';
@@ -107,9 +108,11 @@ $LANG['resource.type_id'] = 'Resource Type';
$LANG['resource.uniquemember'] = 'Collection Members';
$LANG['role.add'] = 'Add Role';
+$LANG['role.add.success'] = 'Role created successfully.';
$LANG['role.cn'] = 'Role Name';
+$LANG['role.delete.success'] = 'Role deleted successfully.';
$LANG['role.description'] = 'Role Description';
-$LANG['role.edit.success'] = 'Role edited successfully';
+$LANG['role.edit.success'] = 'Role updated successfully';
$LANG['role.list'] = 'Role List';
$LANG['role.norecords'] = 'No role records found!';
$LANG['role.system'] = 'Details';
More information about the commits
mailing list