join, leave, accept, reject: handlers + UI, #2588

This commit is contained in:
Julian Lam
2015-01-08 17:23:40 -05:00
parent b0182f702f
commit 96c37c25b0
3 changed files with 55 additions and 4 deletions

View File

@@ -558,12 +558,17 @@ var async = require('async'),
});
};
Groups.approveMembership = function(groupName, uid, callback) {
Groups.acceptMembership = function(groupName, uid, callback) {
// Note: For simplicity, this method intentially doesn't check the caller uid for ownership!
db.setRemove('group:' + groupName + ':pending', uid, callback);
Groups.join.apply(Groups, arguments);
};
Groups.rejectMembership = function(groupName, uid, callback) {
// Note: For simplicity, this method intentially doesn't check the caller uid for ownership!
db.setRemove('group:' + groupName + ':pending', uid, callback);
};
Groups.leave = function(groupName, uid, callback) {
callback = callback || function() {};