diff --git a/UI/MailerUI/UIxMailUserRightsEditor.m b/UI/MailerUI/UIxMailUserRightsEditor.m index 7bab14031..eacbcbcc4 100644 --- a/UI/MailerUI/UIxMailUserRightsEditor.m +++ b/UI/MailerUI/UIxMailUserRightsEditor.m @@ -1,6 +1,6 @@ /* UIxMailUserRightsEditor.m - this file is part of SOGo * - * Copyright (C) 2007-2013 Inverse inc. + * Copyright (C) 2007-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -168,6 +168,22 @@ return [userRights containsObject: SOGoMailRole_Administrator]; } +- (NSDictionary *) userRightsForObject +{ + return [NSDictionary dictionaryWithObjectsAndKeys: + [NSNumber numberWithBool:[self userCanReadMails]], @"userCanReadMails", + [NSNumber numberWithBool:[self userCanMarkMailsRead]], @"userCanMarkMailsRead", + [NSNumber numberWithBool:[self userCanWriteMails]], @"userCanWriteMails", + [NSNumber numberWithBool:[self userCanInsertMails]], @"userCanInsertMails", + [NSNumber numberWithBool:[self userCanPostMails]], @"userCanPostMails", + [NSNumber numberWithBool:[self userCanCreateSubfolders]], @"userCanCreateSubfolders", + [NSNumber numberWithBool:[self userCanEraseMails]], @"userCanEraseMails", + [NSNumber numberWithBool:[self userCanRemoveFolder]], @"userCanRemoveFolder", + [NSNumber numberWithBool:[self userCanExpungeFolder]], @"userCanExpungeFolder", + [NSNumber numberWithBool:[self userIsAdministrator]], @"userIsAdministrator", + nil]; +} + - (void) updateRights { WORequest *request; diff --git a/UI/Templates/MailerUI/UIxMailUserRightsEditor.wox b/UI/Templates/MailerUI/UIxMailUserRightsEditor.wox index 09affde4e..7209cbeee 100644 --- a/UI/Templates/MailerUI/UIxMailUserRightsEditor.wox +++ b/UI/Templates/MailerUI/UIxMailUserRightsEditor.wox @@ -1,83 +1,105 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +