mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-26 15:40:32 +00:00
fix(mail): split "l" and "r" ACL attributes for IMAP mailboxes
Fixes #4983
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
"Access rights to" = "Access rights to";
|
||||
"For user" = "For user";
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"List and see this folder" = "List and see this folder";
|
||||
"View this folder" = "View this folder";
|
||||
"Read mails from this folder" = "Read mails from this folder";
|
||||
"Mark mails read and unread" = "Mark mails read and unread";
|
||||
"Modify the flags of the mails in this folder" = "Modify the flags of the mails in this folder";
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
return ([account imapAclStyle] == rfc4314);
|
||||
}
|
||||
|
||||
- (BOOL) userCanViewFolder
|
||||
{
|
||||
return [userRights containsObject: SOGoRole_FolderViewer];
|
||||
}
|
||||
|
||||
- (void) setUserCanReadMails: (BOOL) userCanReadMails
|
||||
{
|
||||
if (userCanReadMails)
|
||||
@@ -169,6 +174,7 @@
|
||||
- (NSDictionary *) userRightsForObject
|
||||
{
|
||||
return [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:[self userCanViewFolder]], @"userCanViewFolder",
|
||||
[NSNumber numberWithBool:[self userCanReadMails]], @"userCanReadMails",
|
||||
[NSNumber numberWithBool:[self userCanMarkMailsRead]], @"userCanMarkMailsRead",
|
||||
[NSNumber numberWithBool:[self userCanWriteMails]], @"userCanWriteMails",
|
||||
@@ -184,6 +190,11 @@
|
||||
|
||||
- (void) updateRights: (NSDictionary *) newRights
|
||||
{
|
||||
if ([[newRights objectForKey: @"userCanViewFolder"] boolValue])
|
||||
[self appendRight: SOGoRole_FolderViewer];
|
||||
else
|
||||
[self removeRight: SOGoRole_FolderViewer];
|
||||
|
||||
if ([[newRights objectForKey: @"userCanReadMails"] boolValue])
|
||||
[self appendRight: SOGoRole_ObjectViewer];
|
||||
else
|
||||
|
||||
@@ -9,6 +9,14 @@
|
||||
|
||||
<div class="mailUserRights" layout="column">
|
||||
|
||||
<md-checkbox name="userCanViewFolder"
|
||||
ng-model="acl.selectedUser.rights.userCanViewFolder"
|
||||
ng-change="acl.confirmChange(acl.selectedUser)"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0">
|
||||
<var:string label:value="View this folder" />
|
||||
</md-checkbox>
|
||||
|
||||
<md-checkbox name="userCanReadMails"
|
||||
ng-model="acl.selectedUser.rights.userCanReadMails"
|
||||
ng-change="acl.confirmChange(acl.selectedUser)"
|
||||
|
||||
Reference in New Issue
Block a user