mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-22 07:14:21 +00:00
Monotone-Parent: a8698cc119066cef660b176c3e956b5d0d843e7f
Monotone-Revision: f5b8996b9296ee950ea712c8de2c37e474163519 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-27T21:14:54 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
a38722d9cb
commit
06b296ddba
19 files changed
+698
-145
No files matched your search
@@ -76,24 +76,48 @@
|
||||
isMailInvitation = [mailInvitationParam boolValue];
|
||||
}
|
||||
|
||||
- (WOResponse *) _subscribeAction: (BOOL) reallyDo
|
||||
{
|
||||
WOResponse *response;
|
||||
NSURL *mailInvitationURL;
|
||||
|
||||
response = [context response];
|
||||
[response setHeader: @"text/plain; charset=utf-8"
|
||||
forKey: @"Content-Type"];
|
||||
|
||||
[self _setupContext];
|
||||
if ([owner isEqualToString: login])
|
||||
{
|
||||
[response setStatus: 403];
|
||||
[response appendContentString:
|
||||
@"You cannot (un)subscribe to a folder that you own!"];
|
||||
}
|
||||
else
|
||||
{
|
||||
[clientObject subscribeUser: login reallyDo: reallyDo];
|
||||
if (isMailInvitation)
|
||||
{
|
||||
mailInvitationURL
|
||||
= [clientObject soURLToBaseContainerForCurrentUser];
|
||||
[response setStatus: 302];
|
||||
[response setHeader: [mailInvitationURL absoluteString]
|
||||
forKey: @"location"];
|
||||
}
|
||||
else
|
||||
[response setStatus: 204];
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (WOResponse *) subscribeAction
|
||||
{
|
||||
[self _setupContext];
|
||||
|
||||
return [clientObject subscribe: YES
|
||||
inTheNamesOf: nil
|
||||
fromMailInvitation: isMailInvitation
|
||||
inContext: context];
|
||||
return [self _subscribeAction: YES];
|
||||
}
|
||||
|
||||
- (WOResponse *) unsubscribeAction
|
||||
{
|
||||
[self _setupContext];
|
||||
|
||||
return [clientObject subscribe: NO
|
||||
inTheNamesOf: nil
|
||||
fromMailInvitation: isMailInvitation
|
||||
inContext: context];
|
||||
return [self _subscribeAction: NO];
|
||||
}
|
||||
|
||||
- (WOResponse *) canAccessContentAction
|
||||
|
||||
Reference in new issue
Block a user