diff --git a/UI/Common/UIxAclEditor.m b/UI/Common/UIxAclEditor.m index a934ec30e..eadd3cac3 100644 --- a/UI/Common/UIxAclEditor.m +++ b/UI/Common/UIxAclEditor.m @@ -83,6 +83,12 @@ return defaultUserID; } +- (BOOL) canSubscribeUsers +{ + return [[self clientObject] + respondsToSelector: @selector (subscribeUserOrGroup:reallyDo:response:)]; +} + /** * @api {get} /so/:username/:folderPath/acls List users with rights * @apiVersion 1.0.0 @@ -100,11 +106,11 @@ */ - (id ) aclsAction { + NSString *currentUID, *ownerLogin, *info; + NSDictionary *currentUserInfos; + NSMutableDictionary *userData; id result; NSEnumerator *aclsEnum; - NSString *currentUID, *ownerLogin, *info; - NSMutableDictionary *userData; - NSDictionary *currentUserInfos; if (!prepared) { @@ -138,14 +144,17 @@ } // Add the 'Any authenticated' user - userData = [NSDictionary dictionaryWithObjectsAndKeys: - @"", @"uid", - [self labelForKey: @"Any Authenticated User"], @"cn", - @"public-user", @"userClass", - nil]; - [users setObject: userData forKey: @""]; + if ([self canSubscribeUsers]) + { + userData = [NSDictionary dictionaryWithObjectsAndKeys: + @"", @"uid", + [self labelForKey: @"Any Authenticated User"], @"cn", + @"public-user", @"userClass", + nil]; + [users setObject: userData forKey: @""]; + } - if ([self isPublicAccessEnabled]) + if ([self canSubscribeUsers] && [self isPublicAccessEnabled]) { // Add the 'public access' user userData = [NSDictionary dictionaryWithObjectsAndKeys: @@ -202,12 +211,6 @@ return [um contactInfosForUserWithUIDorEmail: [self currentUser]]; } -- (BOOL) canSubscribeUsers -{ - return [[self clientObject] - respondsToSelector: @selector (subscribeUserOrGroup:reallyDo:response:)]; -} - - (BOOL) currentUserIsSubscribed { SOGoGCSFolder *folder; diff --git a/UI/Templates/UIxAclEditor.wox b/UI/Templates/UIxAclEditor.wox index 38efdbb4f..bd085f732 100644 --- a/UI/Templates/UIxAclEditor.wox +++ b/UI/Templates/UIxAclEditor.wox @@ -31,14 +31,16 @@ - - - + + + + +