mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-07 04:47:14 +00:00
Monotone-Parent: c494ba259363880f5d46e8931a1708d1ba1aed45
Monotone-Revision: 5f57280bc0c8371b942a310b60e1dfa1a790fb84 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-09-30T18:05:14 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
80df885644
commit
79fc9f4c26
30 files changed
+712
-10
No files matched your search
@@ -231,4 +231,41 @@
|
||||
return [self redirectToLocation: url];
|
||||
}
|
||||
|
||||
- (WOResponse *) _performDelegationAction: (SEL) action
|
||||
{
|
||||
SOGoMailAccount *co;
|
||||
WOResponse *response;
|
||||
NSString *uid;
|
||||
|
||||
co = [self clientObject];
|
||||
if ([[co nameInContainer] isEqualToString: @"0"])
|
||||
{
|
||||
uid = [[context request] formValueForKey: @"uid"];
|
||||
if ([uid length] > 0)
|
||||
{
|
||||
[co performSelector: action
|
||||
withObject: [NSArray arrayWithObject: uid]];
|
||||
response = [self responseWith204];
|
||||
}
|
||||
else
|
||||
response = [self responseWithStatus: 500
|
||||
andString: @"Missing 'uid' parameter."];
|
||||
}
|
||||
else
|
||||
response = [self responseWithStatus: 403
|
||||
andString: @"This action cannot be performed on secondary accounts."];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) addDelegateAction
|
||||
{
|
||||
return [self _performDelegationAction: @selector (addDelegates:)];
|
||||
}
|
||||
|
||||
- (WOResponse *) removeDelegateAction
|
||||
{
|
||||
return [self _performDelegationAction: @selector (removeDelegates:)];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in new issue
Block a user