mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-11 11:25:12 +00:00
Monotone-Parent: 581e13f64111105e0bce624d9e6267f5eb79f46d
Monotone-Revision: 7a02739cae6babfe41777a34b6d6949a9385d396 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-04-22T14:50:40 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -260,16 +260,25 @@ static BOOL sendFolderAdvisories = NO;
|
||||
- (NSException *) setDavDisplayName: (NSString *) newName
|
||||
{
|
||||
NSException *error;
|
||||
NSArray *currentRoles;
|
||||
|
||||
if ([newName length])
|
||||
currentRoles = [[context activeUser] rolesForObject: self
|
||||
inContext: context];
|
||||
if ([currentRoles containsObject: SoRole_Owner])
|
||||
{
|
||||
[self renameTo: newName];
|
||||
error = nil;
|
||||
if ([newName length])
|
||||
{
|
||||
[self renameTo: newName];
|
||||
error = nil;
|
||||
}
|
||||
else
|
||||
error = [NSException exceptionWithHTTPStatus: 400
|
||||
reason: [NSString stringWithFormat:
|
||||
@"Empty string"]];
|
||||
}
|
||||
else
|
||||
error = [NSException exceptionWithHTTPStatus: 400
|
||||
reason: [NSString stringWithFormat:
|
||||
@"Empty string"]];
|
||||
error = [NSException exceptionWithHTTPStatus: 403
|
||||
reason: @"Modification denied."];
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user