From 0f87c1e6487cc5cbe0b13bc869bb634c222be6fc Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 1 Feb 2012 21:11:28 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: d880f3f750251d35b56db7d720ccacbdeead7540 Monotone-Revision: 05f8b72feb6a6c81f20462457e2dbc6c47ae9edc Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2012-02-01T21:11:28 --- ChangeLog | 15 ++++++ UI/Common/English.lproj/Localizable.strings | 6 ++- UI/Common/UIxUserRightsEditor.h | 2 + UI/Common/UIxUserRightsEditor.m | 29 +++++++++-- UI/Contacts/English.lproj/Localizable.strings | 4 +- UI/MailerUI/English.lproj/Localizable.strings | 6 ++- .../English.lproj/Localizable.strings | 3 +- .../UIxContactsUserRightsEditor.wox | 19 ++----- .../MailerUI/UIxMailUserRightsEditor.wox | 11 ++--- .../SchedulerUI/UIxCalUserRightsEditor.wox | 17 ++----- UI/WebServerResources/ContactsUI.js | 2 +- UI/WebServerResources/MailerUI.js | 2 +- .../UIxCalUserRightsEditor.css | 22 +++++++-- .../UIxCalUserRightsEditor.js | 13 +++-- .../UIxContactsUserRightsEditor.css | 49 ++++++------------- .../UIxContactsUserRightsEditor.js | 13 +++-- .../UIxMailUserRightsEditor.css | 39 +++------------ .../UIxMailUserRightsEditor.js | 2 +- 18 files changed, 129 insertions(+), 125 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5a7a898d0..c07563d61 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2012-02-01 Francis Lachapelle + + * UI/WebServerResources/UIxCalUserRightsEditor.js (onUpdateACL): + added some serious warnings when giving access rights to any + authenticated users or public access. + + * UI/WebServerResources/UIxMailUserRightsEditor.js (onUpdateACL): idem. + + * UI/WebServerResources/UIxContactsUserRightsEditor.js (onUpdateACL): idem. + + * UI/Common/UIxUserRightsEditor.m (-folderName): new method that + returns the folder display name. + (-userDisplayName): now also return the names of anonymous and + authenticated users. + 2012-01-31 Francis Lachapelle * SoObjects/SOGo/WOResourceManager+SOGo.m diff --git a/UI/Common/English.lproj/Localizable.strings b/UI/Common/English.lproj/Localizable.strings index d9b468202..c484f9eb3 100644 --- a/UI/Common/English.lproj/Localizable.strings +++ b/UI/Common/English.lproj/Localizable.strings @@ -37,8 +37,10 @@ "Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object."; -"Are you sure you want to give rights to all authenticated users?" = "Are you sure you want to give rights to all authenticated users?"; -"Are you sure you want to give rights to everybody?" = "Are you sure you want to give rights to everybody?"; +"Any user with an account on this system will be able to access your calendar \"%{0}\". Are you certain you trust them all?" + = "Any user with an account on this system will be able to access your calendar \"%{0}\". Are you certain you trust them all?"; +"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?" + = "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?"; "Give Access" = "Give Access"; "Keep Private" = "Keep Private"; diff --git a/UI/Common/UIxUserRightsEditor.h b/UI/Common/UIxUserRightsEditor.h index 843324126..8cb083c9e 100644 --- a/UI/Common/UIxUserRightsEditor.h +++ b/UI/Common/UIxUserRightsEditor.h @@ -40,6 +40,8 @@ - (NSString *) userDisplayName; - (NSString *) uid; +- (NSString *) folderName; + - (void) appendRight: (NSString *) newRight; - (void) appendExclusiveRight: (NSString *) newRight fromList: (NSArray *) list; diff --git a/UI/Common/UIxUserRightsEditor.m b/UI/Common/UIxUserRightsEditor.m index f9c09b0cc..3519abc0e 100644 --- a/UI/Common/UIxUserRightsEditor.m +++ b/UI/Common/UIxUserRightsEditor.m @@ -62,6 +62,15 @@ return uid; } +- (NSString *) folderName +{ + id folder; + + folder = [context clientObject]; + + return [folder displayName]; +} + - (BOOL) userIsDefaultUser { if (!defaultUserID) @@ -79,11 +88,21 @@ { SOGoUserManager *um; - um = [SOGoUserManager sharedUserManager]; - - return [NSString stringWithFormat: @"%@ <%@>", - [um getCNForUID: uid], - [um getEmailForUID: uid]]; + if ([self userIsAnonymousUser]) + { + return [self labelForKey: @"Public Access"]; + } + else if ([self userIsDefaultUser]) + { + return [self labelForKey: @"Any Authenticated User"]; + } + else + { + um = [SOGoUserManager sharedUserManager]; + return [NSString stringWithFormat: @"%@ <%@>", + [um getCNForUID: uid], + [um getEmailForUID: uid]]; + } } - (BOOL) _initRights diff --git a/UI/Contacts/English.lproj/Localizable.strings b/UI/Contacts/English.lproj/Localizable.strings index 4e310e2a9..9d2fcea6a 100644 --- a/UI/Contacts/English.lproj/Localizable.strings +++ b/UI/Contacts/English.lproj/Localizable.strings @@ -154,7 +154,9 @@ "Unable to subscribe to that folder!" = "Unable to subscribe to that folder."; -"User rights for:" = "User rights for:"; +/* acls */ +"Access rights to" = "Access rights to"; +"For user" = "For user"; "Any Authenticated User" = "Any Authenticated User"; "Public Access" = "Public Access"; diff --git a/UI/MailerUI/English.lproj/Localizable.strings b/UI/MailerUI/English.lproj/Localizable.strings index 95ba0390a..179febdbd 100644 --- a/UI/MailerUI/English.lproj/Localizable.strings +++ b/UI/MailerUI/English.lproj/Localizable.strings @@ -64,8 +64,10 @@ "Shared Account: " = "Shared Account: "; /* acls */ -"Default Roles" = "Default Roles"; -"User rights for:" = "User rights for:"; +"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"; "Read mails from this folder" = "Read mails from this folder"; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index ce6ff76cd..6ffc88f2b 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -131,7 +131,8 @@ /* acls */ -"User rights for:" = "User rights for:"; +"Access rights to" = "Access rights to"; +"For user" = "For user"; "Any Authenticated User" = "Any Authenticated User"; "Public Access" = "Public Access"; diff --git a/UI/Templates/ContactsUI/UIxContactsUserRightsEditor.wox b/UI/Templates/ContactsUI/UIxContactsUserRightsEditor.wox index 48bd817df..0952888f4 100644 --- a/UI/Templates/ContactsUI/UIxContactsUserRightsEditor.wox +++ b/UI/Templates/ContactsUI/UIxContactsUserRightsEditor.wox @@ -13,21 +13,10 @@
- - - - + +
- - - - + +