(fix) do now show the subscribe options for non-GCS folders
parent
d674b33a20
commit
0b5146655d
|
@ -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 <WOActionResults>) aclsAction
|
||||
{
|
||||
NSString *currentUID, *ownerLogin, *info;
|
||||
NSDictionary *currentUserInfos;
|
||||
NSMutableDictionary *userData;
|
||||
id <WOActionResults> 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:
|
||||
@"<default>", @"uid",
|
||||
[self labelForKey: @"Any Authenticated User"], @"cn",
|
||||
@"public-user", @"userClass",
|
||||
nil];
|
||||
[users setObject: userData forKey: @"<default>"];
|
||||
if ([self canSubscribeUsers])
|
||||
{
|
||||
userData = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"<default>", @"uid",
|
||||
[self labelForKey: @"Any Authenticated User"], @"cn",
|
||||
@"public-user", @"userClass",
|
||||
nil];
|
||||
[users setObject: userData forKey: @"<default>"];
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
|
@ -31,14 +31,16 @@
|
|||
</div>
|
||||
</md-button>
|
||||
<md-card-content id="AccessRightList" ng-show="user.uid == acl.selectedUser.uid">
|
||||
<md-checkbox ng-model="user.isSubscribed"
|
||||
label:arial-label="Subscribe User"
|
||||
ng-disabled="user.wasSubscribed"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0"
|
||||
ng-hide="user.$isSpecial()">
|
||||
<var:string label:value="Subscribe User"/>
|
||||
</md-checkbox>
|
||||
<var:if condition="canSubscribeUsers">
|
||||
<md-checkbox ng-model="user.isSubscribed"
|
||||
label:arial-label="Subscribe User"
|
||||
ng-disabled="user.wasSubscribed"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0"
|
||||
ng-hide="user.$isSpecial()">
|
||||
<var:string label:value="Subscribe User"/>
|
||||
</md-checkbox>
|
||||
</var:if>
|
||||
<div ng-include="'UIxUserRightsEditor'">
|
||||
<!--
|
||||
Load ng-template #UIxUserRightsEditor from main module wox. Inner wox templates are:
|
||||
|
|
Loading…
Reference in New Issue