mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-23 02:16:23 +00:00
refactor codes and applied comments
This commit is contained in:
committed by
Francis Lachapelle
parent
c82143fd2e
commit
22faf5c285
@@ -27,22 +27,22 @@
|
||||
|
||||
Acl.prototype.$addUser = function(uid) {
|
||||
var param = {"uid": uid};
|
||||
Acl.$$resource.fetch(this.folder_id, "addUserInAcls", param);
|
||||
return Acl.$$resource.fetch(this.folder_id, "addUserInAcls", param);
|
||||
};
|
||||
|
||||
Acl.prototype.$removeUser = function(uid) {
|
||||
var param = {"uid": uid};
|
||||
Acl.$$resource.fetch(this.folder_id, "removeUserFromAcls", param);
|
||||
return Acl.$$resource.fetch(this.folder_id, "removeUserFromAcls", param);
|
||||
};
|
||||
|
||||
Acl.prototype.$saveUsersRights = function(dirtyObjects) {
|
||||
var param = {"action": "saveUserRights"};
|
||||
Acl.$$resource.save(this.folder_id, dirtyObjects, param);
|
||||
return Acl.$$resource.save(this.folder_id, dirtyObjects, param);
|
||||
};
|
||||
|
||||
Acl.prototype.$subscribeUsers = function(uids) {
|
||||
var param = {"uids": uids};
|
||||
Acl.$$resource.fetch(this.folder_id, "subscribeUsers", param);
|
||||
return Acl.$$resource.fetch(this.folder_id, "subscribeUsers", param);
|
||||
};
|
||||
|
||||
Acl.prototype.$users = function() {
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
|
||||
/**
|
||||
* @function fetch
|
||||
* @desc Fetch resources using a specific object, action and/or parameters
|
||||
* @param {string} object_id - the object on which the action will be applied (ex: addressbook, calendar)
|
||||
* @desc Fetch resources using a specific folder, action and/or parameters
|
||||
* @param {string} folder_id - the folder on which the action will be applied (ex: addressbook, calendar)
|
||||
* @param {string} action - the action to be used in the URL
|
||||
* @param {Object} params - Object parameters injected through the $http protocol
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
}];
|
||||
|
||||
/* Factory registration in Angular module */
|
||||
angular.module('SOGo.Common').factory('sgUser', User.factory);
|
||||
angular.module('SOGo.Common').factory('User', User.factory);
|
||||
|
||||
/* Instance methods
|
||||
* Public method, assigned to prototype
|
||||
@@ -21,8 +21,6 @@
|
||||
User.prototype.$filter = function(search) {
|
||||
// return a collections of users for a filter
|
||||
var param = {search: search};
|
||||
return User.$$resource.fetch(null, "usersSearch", param).then(function(results) {
|
||||
return results;
|
||||
})
|
||||
return User.$$resource.fetch(null, "usersSearch", param);
|
||||
};
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user