Respect mailbox administration rights of user
parent
85f842fbaf
commit
3137e4cdbb
1
NEWS
1
NEWS
|
@ -24,6 +24,7 @@ Bug fixes
|
||||||
- [web] fixed Sieve script activation when vacation start date is in the future (#3885)
|
- [web] fixed Sieve script activation when vacation start date is in the future (#3885)
|
||||||
- [web] fixed moving a component without the proper rights (#3889)
|
- [web] fixed moving a component without the proper rights (#3889)
|
||||||
- [web] restored Sieve folder encoding support (#3904)
|
- [web] restored Sieve folder encoding support (#3904)
|
||||||
|
- [web] allow edition of a mailbox rights when user can administer mailbox
|
||||||
|
|
||||||
3.2.1 (2016-11-02)
|
3.2.1 (2016-11-02)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -1537,11 +1537,12 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||||
path = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
|
path = [[self imap4Connection] imap4FolderNameForURL: [self imap4URL]];
|
||||||
|
|
||||||
if ([self _path: path
|
if ([self _path: path
|
||||||
isInNamespaces: [mailAccount otherUsersFolderNamespaces]]
|
isInNamespaces: [mailAccount otherUsersFolderNamespaces]] ||
|
||||||
|| [self _path: path
|
[self _path: path
|
||||||
isInNamespaces: [mailAccount sharedFolderNamespaces]])
|
isInNamespaces: [mailAccount sharedFolderNamespaces]])
|
||||||
[acls addObject: SOGoRole_ObjectViewer];
|
[acls addObject: SOGoRole_ObjectViewer];
|
||||||
else
|
else
|
||||||
|
// Inside user's namespace, automatically owner
|
||||||
[acls addObject: SoRole_Owner];
|
[acls addObject: SoRole_Owner];
|
||||||
|
|
||||||
return acls;
|
return acls;
|
||||||
|
@ -1554,23 +1555,22 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||||
|
|
||||||
userLogin = [[context activeUser] login];
|
userLogin = [[context activeUser] login];
|
||||||
if ([uid isEqualToString: userLogin])
|
if ([uid isEqualToString: userLogin])
|
||||||
|
// Login user wants her ACLs
|
||||||
acls = [self _sharesACLs];
|
acls = [self _sharesACLs];
|
||||||
else
|
else
|
||||||
|
// Login user wants the ACLs of another user
|
||||||
acls = [NSMutableArray array];
|
acls = [NSMutableArray array];
|
||||||
|
|
||||||
if ([owner isEqualToString: userLogin])
|
if (!mailboxACL)
|
||||||
{
|
[self _readMailboxACL];
|
||||||
if (!mailboxACL)
|
|
||||||
[self _readMailboxACL];
|
|
||||||
|
|
||||||
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
if ([mailboxACL isKindOfClass: [NSDictionary class]])
|
||||||
{
|
{
|
||||||
userAcls = [mailboxACL objectForKey: uid];
|
userAcls = [mailboxACL objectForKey: uid];
|
||||||
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
if (!([userAcls length] || [uid isEqualToString: defaultUserID]))
|
||||||
userAcls = [mailboxACL objectForKey: defaultUserID];
|
userAcls = [mailboxACL objectForKey: defaultUserID];
|
||||||
if ([userAcls length])
|
if ([userAcls length])
|
||||||
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
[acls addObjectsFromArray: [self _imapAclsToSOGoAcls: userAcls]];
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return acls;
|
return acls;
|
||||||
|
|
Loading…
Reference in New Issue