See ChangeLog.

Monotone-Parent: d880f3f750251d35b56db7d720ccacbdeead7540
Monotone-Revision: 05f8b72feb6a6c81f20462457e2dbc6c47ae9edc

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2012-02-01T21:11:28
This commit is contained in:
Francis Lachapelle
2012-02-01 21:11:28 +00:00
parent 16edbd7024
commit 0f87c1e648
18 changed files with 129 additions and 125 deletions

View File

@@ -1,3 +1,18 @@
2012-02-01 Francis Lachapelle <flachapelle@inverse.ca>
* 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 <flachapelle@inverse.ca>
* SoObjects/SOGo/WOResourceManager+SOGo.m

View File

@@ -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";

View File

@@ -40,6 +40,8 @@
- (NSString *) userDisplayName;
- (NSString *) uid;
- (NSString *) folderName;
- (void) appendRight: (NSString *) newRight;
- (void) appendExclusiveRight: (NSString *) newRight
fromList: (NSArray *) list;

View File

@@ -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

View File

@@ -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";

View File

@@ -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";

View File

@@ -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";

View File

@@ -13,21 +13,10 @@
<form id="userRightsForm" const:href="saveUserRights">
<input id="uid" type="hidden" name="uid" var:value="uid"/>
<div class="title">
<var:if condition="userIsDefaultUser">
<label><span class="value"
><var:string label:value="Any Authenticated User"
/></span></label>
</var:if><var:if condition="userIsDefaultUser" const:negate="YES"
><var:if condition="userIsAnonymousUser"
><label><span class="value"
><var:string label:value="Public Access"
/></span></label
></var:if
><var:if condition="userIsAnonymousUser" const:negate="YES"
><label><var:string label:value="User rights for:"/><br/>
<span class="value"><var:string value="userDisplayName"
/></span></label></var:if>
</var:if>
<label><var:string label:value="Access rights to"/><br/>
<span id="folderName" class="value"><var:string value="folderName"/></span></label>
<label><var:string label:value="For user"/><br/>
<span class="value"><var:string value="userDisplayName"/></span></label>
</div>
<div class="calendarUserRights">
<var:if condition="userIsAnonymousUser" const:negate="YES"

View File

@@ -13,13 +13,10 @@
<form id="userRightsForm" const:href="saveUserRights">
<input id="uid" type="hidden" name="uid" var:value="uid"/>
<div class="title">
<var:if condition="userIsDefaultUser">
<label><span class="value"><var:string label:value="Default Roles"
/></span></label>
</var:if><var:if condition="userIsDefaultUser" const:negate="YES">
<label><var:string label:value="User rights for:"/><br/>
<span class="value"><var:string value="userDisplayName"
/></span></label></var:if>
<label><var:string label:value="Access rights to"/><br/>
<span id="folderName" class="value"><var:string value="folderName"/></span></label>
<label><var:string label:value="For user"/><br/>
<span class="value"><var:string value="userDisplayName"/></span></label>
</div>
<div class="calendarUserRights">
<label><input type="checkbox" class="checkBox"

View File

@@ -13,19 +13,10 @@
<form id="userRightsForm" const:href="saveUserRights">
<input id="uid" type="hidden" name="uid" var:value="uid"/>
<div class="title">
<var:if condition="userIsDefaultUser">
<label><span class="value"><var:string label:value="Any Authenticated User"
/></span></label>
</var:if><var:if condition="userIsDefaultUser" const:negate="YES"
><var:if condition="userIsAnonymousUser"
><label><span class="value"><var:string label:value="Public Access"
/></span></label
></var:if
><var:if condition="userIsAnonymousUser" const:negate="YES"
><label><var:string label:value="User rights for:"/><br/>
<span class="value"><var:string value="userDisplayName"
/></span></label></var:if>
</var:if>
<label><span><var:string label:value="Access rights to"/></span>
<span id="folderName" class="value"><var:string value="folderName"/></span></label>
<label><span><var:string label:value="For user"/></span>
<span class="value"><var:string value="userDisplayName"/></span></label>
</div>
<div class="calendarUserRights">
<var:foreach list="rightTypes" item="currentRightType">

View File

@@ -3,7 +3,7 @@
var cachedContacts = {};
var usersRightsWindowHeight = 179;
var usersRightsWindowHeight = 194;
var usersRightsWindowWidth = 450;
var Contact = {

View File

@@ -24,7 +24,7 @@ var Mailer = {
sortByThread: false
};
var usersRightsWindowHeight = 320;
var usersRightsWindowHeight = 335;
var usersRightsWindowWidth = 400;
var pageContent = $("pageContent");

View File

@@ -3,17 +3,29 @@ DIV.title
vertical-align: bottom;
padding-top: 8px;
padding-left: 1em;
height: 33px;
padding: 5px;
background-color: #fff;
border-bottom: 1px solid #555; }
DIV.title SPAN
{ float: left;
line-height: 14px;
text-align: right;
width: 120px; }
DIV.title SPAN.value
{ margin-left: 1em;
{ float: none;
margin-left: 1em;
font-size: 14px;
font-weight: bold; }
DIV.calendarUserRights
{ margin: 1em; }
DIV.title LABEL
{ display: block;
clear: both; }
DIV.calendarUserRights,
DIV.basicUserRights
{ margin: 1em;}
DIV.calendarUserRights SPAN
{ float: left;
@@ -33,4 +45,4 @@ DIV.dialog.none
top: 0px;
left: 0px;
right: 0px;
margin: 50px auto; }
margin: 25px auto; }

View File

@@ -21,9 +21,16 @@ function onUpdateACL(event) {
}
}
if (enabled) {
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to " + ((uid == "<default>")?"all authenticated users":"everybody") + "?"),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
if (uid == '<default>')
showConfirmDialog(_("Warning"),
_("Any user with an account on this system will be able to access your calendar \"%{0}\". Are you certain you trust them all?").formatted($("folderName").allTextContent()),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
else
showConfirmDialog(_("Warning"),
_("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?").formatted($("folderName").allTextContent()),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
return false;
}
}

View File

@@ -3,46 +3,29 @@ DIV.title
vertical-align: bottom;
padding-top: 8px;
padding-left: 1em;
height: 33px;
padding: 5px;
background-color: #fff;
border-bottom: 1px solid #555; }
DIV.calendarUserRights,
DIV.basicUserRights
{ margin: 1em;}
DIV.title SPAN
{ float: left;
line-height: 14px;
text-align: right;
width: 120px; }
DIV.title SPAN.value
{ margin-left: 1em;
{ float: none;
margin-left: 1em;
font-size: 14px;
font-weight: bold; }
DIV.calendarUserRights
{ margin: 1em;}
DIV.calendarUserRights > TABLE
{ background-color: #fff;
width: 45em;
color: #999;
border-collapse: collapse;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
border-top: 2px solid #222;
border-left: 2px solid #222;
-moz-border-top-colors: #9c9a94 #000 transparent;
-moz-border-left-colors: #9c9a94 #000 transparent; }
DIV.calendarUserRights > TABLE TR.permissions TH
{ color: #00f;
/* background-color: #ddd;
*/ border-bottom: 1px solid #999; }
DIV.calendarUserRights > TABLE TH
{ width: 15em; }
DIV.calendarUserRights > TABLE TD.eventType
{ width: 5em;
text-align: right;
border-right: 1px solid #999; }
DIV.calendarUserRights > TABLE TD
{ text-align: center;
border-top: 1px solid #cecbff; }
DIV.title LABEL
{ display: block;
clear: both; }
DIV.buttons
{ text-align: right;

View File

@@ -12,9 +12,16 @@ function onUpdateACL(event) {
}
}
if (enabled) {
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to " + ((uid == "<default>")?"all authenticated users":"everybody") + "?"),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
if (uid == '<default>')
showConfirmDialog(_("Warning"),
_("Any user with an account on this system will be able to access your address book \"%{0}\". Are you certain you trust them all?").formatted($("folderName").allTextContent()),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
else
showConfirmDialog(_("Warning"),
_("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?").formatted($("folderName").allTextContent()),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
return false;
}
}

View File

@@ -3,47 +3,22 @@ DIV.title
vertical-align: bottom;
padding-top: 8px;
padding-left: 1em;
height: 33px;
padding: 5px;
background-color: #fff;
border-bottom: 1px solid #555; }
DIV.title SPAN.value
{ margin-left: 1em;
{ margin-left: 2em;
font-size: 14px;
font-weight: bold; }
DIV.calendarUserRights
DIV.title LABEL
{ display: block; }
DIV.calendarUserRights,
DIV.basicUserRights
{ margin: 1em;}
DIV.calendarUserRights > TABLE
{ background-color: #fff;
width: 45em;
color: #999;
border-collapse: collapse;
border-bottom: 1px solid #fff;
border-right: 1px solid #fff;
border-top: 2px solid #222;
border-left: 2px solid #222;
-moz-border-top-colors: #9c9a94 #000 transparent;
-moz-border-left-colors: #9c9a94 #000 transparent; }
DIV.calendarUserRights > TABLE TR.permissions TH
{ color: #00f;
/* background-color: #ddd;
*/ border-bottom: 1px solid #999; }
DIV.calendarUserRights > TABLE TH
{ width: 15em; }
DIV.calendarUserRights > TABLE TD.eventType
{ width: 5em;
text-align: right;
border-right: 1px solid #999; }
DIV.calendarUserRights > TABLE TD
{ text-align: center;
border-top: 1px solid #cecbff; }
DIV.buttons
{ text-align: right;
margin: 1em; }

View File

@@ -11,7 +11,7 @@ function onUpdateACL(event) {
}
}
if (enabled) {
showConfirmDialog(_("Confirmation"), _("Are you sure you want to give rights to all authenticated users?"),
showConfirmDialog(_("Warning"), _("Any user with an account on this system will be able to access your mailbox \"%{0}\". Are you certain you trust them all?").formatted($("folderName").allTextContent()),
onUpdateACLConfirm, onUpdateACLCancel,
"Give Access", "Keep Private");
return false;