Fix ACL editor for authenticated users in Mailer

pull/201/head
Francis Lachapelle 2016-02-23 10:20:10 -05:00
parent aae02741f9
commit e328d43403
5 changed files with 25 additions and 12 deletions

1
NEWS
View File

@ -30,6 +30,7 @@ Bug fixes
- [web] fixed mail draft autosave in preferences (#3519)
- [web] fixed password change (#3496)
- [web] fixed saving of notification email for calendar changes (#3522)
- [web] fixed ACL editor for authenticated users in Mail module
- [eas] allow EAS attachments get on 2nd-level mailboxes (#3505)
- [eas] fix EAS bday shift (#3518)

View File

@ -135,15 +135,15 @@
}
// Add the 'Any authenticated' user
if ([self canSubscribeUsers])
{
if (defaultUserID)
{
userData = [NSDictionary dictionaryWithObjectsAndKeys:
@"<default>", @"uid",
[self labelForKey: @"Any Authenticated User"], @"cn",
defaultUserID, @"uid",
[self labelForKey: @"Any Authenticated User"], @"cn",
@"public-user", @"userClass",
nil];
[users setObject: userData forKey: @"<default>"];
}
[users setObject: userData forKey: defaultUserID];
}
if ([self canSubscribeUsers] && [self isPublicAccessEnabled])
{

View File

@ -97,8 +97,12 @@
<md-dialog-actions ng-hide="acl.confirmation.showing">
<md-button class="md-primary" ng-click="acl.saveModal()"><var:string label:value="Save"/></md-button>
</md-dialog-actions>
<md-dialog-content class="md-default-theme md-bg md-warn md-padding sg-dialog-message ng-hide"
ng-show="acl.confirmation.showing">
<div>{{acl.confirmation.message}}</div>
</md-dialog-content>
<md-dialog-actions ng-show="acl.confirmation.showing">
<span>{{acl.confirmation.message}}</span>
<md-button ng-click="acl.selectedUser.$resetRights(true); acl.confirmation.showing = false">
<var:string label:value="Cancel"/>
</md-button>

View File

@ -44,7 +44,7 @@
}
function confirmChange(user) {
var confirmation = user.$confirmRights();
var confirmation = user.$confirmRights(vm.folder);
if (confirmation) {
vm.confirmation.showing = true;
vm.confirmation.message = confirmation;

View File

@ -195,7 +195,7 @@
* @desc Check if a confirmation is required before giving some rights.
* @return the confirmation message or false if no confirmation is required
*/
User.prototype.$confirmRights = function() {
User.prototype.$confirmRights = function(folder) {
var confirmation = false;
if (this.$confirmation) {
@ -205,10 +205,18 @@
if (_.some(_.values(this.rights))) {
if (this.uid == 'anonymous') {
confirmation = l('Potentially anyone on the Internet will be able to access your folder, even if they do not have an account on this system. Is this information suitable for the public Internet?');
if (folder.constructor.name == 'AddressBook')
confirmation = l('Potentially anyone on the Internet will be able to access your address book "%{0}", even if they do not have an account on this system. Is this information suitable for the public Internet?', folder.name);
else if (folder.constructor.name == 'Calendar')
confirmation = l('Potentially anyone on the Internet will be able to access your calendar "%{0}", even if they do not have an account on this system. Is this information suitable for the public Internet?', folder.name);
}
else if (this.uid == '<default>') {
confirmation = l('Any user with an account on this system will be able to access your folder. Are you certain you trust them all?');
else if (this.uid == 'anyone' || this.uid == '<default>') {
if (folder.constructor.name == 'AddressBook')
confirmation = l('Any user with an account on this system will be able to access your address book "%{0}". Are you certain you trust them all?', folder.name);
else if (folder.constructor.name == 'Calendar')
confirmation = l('Any user with an account on this system will be able to access your calendar "%{0}". Are you certain you trust them all?', folder.name);
else if (folder.constructor.name == 'Mailbox')
confirmation = l('Any user with an account on this system will be able to access your mailbox "%{0}". Are you certain you trust them all?', folder.name);
}
}