Monotone-Parent: 8d12e48e58680d1195d0d7a0f514a3cac44d0767
Monotone-Revision: ceeed83c021dfd38a21395784e4f16ca9f08acd3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-07T21:30:36 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
8193a90fc2
commit
db99b3510c
11
ChangeLog
11
ChangeLog
|
@ -1,5 +1,16 @@
|
|||
2010-06-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/UIxAclEditor.js (onAclLoadHandler): add
|
||||
tooltips to the special user entries.
|
||||
|
||||
* UI/Common/UIxAclEditor.m (_displayNameForUID:):
|
||||
(-ownerName, hasOwner): removed useless methods.
|
||||
(-currentUserDisplayName): make use of the method below from the um.
|
||||
|
||||
* SoObjects/SOGo/SOGoUserManager.m (-getFullEmailForUID:):
|
||||
enhanced to return a proper string for users with an empty "cn" or
|
||||
an empty "c_email".
|
||||
|
||||
* SoObjects/Appointments/SOGoAppointmentFolders.m
|
||||
(-toOneRelationShipKeys): with a request from iCal, we return
|
||||
nothing to avoid confusing iCal 3 with non-collection resources.
|
||||
|
|
|
@ -308,12 +308,23 @@
|
|||
- (NSString *) getFullEmailForUID: (NSString *) uid
|
||||
{
|
||||
NSDictionary *contactInfos;
|
||||
NSString *cn, *email, *fullEmail;
|
||||
|
||||
contactInfos = [self contactInfosForUserWithUIDorEmail: uid];
|
||||
email = [contactInfos objectForKey: @"c_email"];
|
||||
cn = [contactInfos objectForKey: @"cn"];
|
||||
if ([cn length] > 0)
|
||||
{
|
||||
if ([email length] > 0)
|
||||
fullEmail = [NSString stringWithFormat: @"%@ <%@>",
|
||||
cn, email];
|
||||
else
|
||||
fullEmail = cn;
|
||||
}
|
||||
else
|
||||
fullEmail = email;
|
||||
|
||||
return [NSString stringWithFormat: @"%@ <%@>",
|
||||
[contactInfos objectForKey: @"cn"],
|
||||
[contactInfos objectForKey: @"c_email"]];
|
||||
return fullEmail;
|
||||
}
|
||||
|
||||
- (NSString *) getImapLoginForUID: (NSString *) uid
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Desculpe, os direitos de usuário não podem ser modificados para este objeto.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Omlouváme se, ale uživatelská práva pro tento objekt nemohou být nastavena.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "De machtigingen kunnen niet worden ingesteld voor dit object.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Tout utilisateur identifié";
|
||||
"Public Access" = "Accès public";
|
||||
"Any user not listed above" = "Tout utilisateur du système non-listé ci-haut";
|
||||
"Anybody accessing this resource from the public area" = "Quiconque accède à cette ressource via l'espace public";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Leider können die Benutzerrechte für dieses Objekt nicht konfiguriert werden.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sajnálom, erre az objektumra nem állíthatók be felhasználói jogosultságok.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Non è possibile configurare i permessi per questo oggetto.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Извините, для данного объекта невозможно настроить права доступа.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sorry, the user rights can not be configured for that object.";
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Tyvärr, användarrättigheterna kan inte konfigureras för objektet.";
|
||||
|
||||
|
|
|
@ -74,36 +74,6 @@
|
|||
return aclUsers;
|
||||
}
|
||||
|
||||
- (NSString *) _displayNameForUID: (NSString *) uid
|
||||
{
|
||||
SOGoUserManager *um;
|
||||
NSString *s;
|
||||
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
s = [uid hasPrefix: @"@"] ? [uid substringFromIndex: 1] : uid;
|
||||
|
||||
return [NSString stringWithFormat: @"%@ <%@>",
|
||||
[um getCNForUID: s], [um getEmailForUID: s]];
|
||||
}
|
||||
|
||||
- (NSString *) ownerName
|
||||
{
|
||||
NSString *ownerLogin;
|
||||
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
|
||||
return [self _displayNameForUID: ownerLogin];
|
||||
}
|
||||
|
||||
- (BOOL) hasOwner
|
||||
{
|
||||
NSString *ownerLogin;
|
||||
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
|
||||
return (![ownerLogin isEqualToString: @"nobody"]);
|
||||
}
|
||||
|
||||
- (NSString *) defaultUserID
|
||||
{
|
||||
if (!defaultUserID)
|
||||
|
@ -112,11 +82,13 @@
|
|||
return defaultUserID;
|
||||
}
|
||||
|
||||
- (void) _prepareUsers
|
||||
- (NSArray *) usersForObject
|
||||
{
|
||||
NSEnumerator *aclsEnum;
|
||||
NSString *currentUID, *ownerLogin;
|
||||
|
||||
if (!prepared)
|
||||
{
|
||||
ownerLogin = [[self clientObject] ownerInContext: context];
|
||||
if (!defaultUserID)
|
||||
ASSIGN (defaultUserID, [[self clientObject] defaultUserID]);
|
||||
|
@ -132,15 +104,9 @@
|
|||
|| [currentUID isEqualToString: @"anonymous"]))
|
||||
[users addObjectUniquely: currentUID];
|
||||
}
|
||||
|
||||
prepared = YES;
|
||||
}
|
||||
|
||||
- (NSArray *) usersForObject
|
||||
{
|
||||
if (!prepared)
|
||||
[self _prepareUsers];
|
||||
|
||||
return users;
|
||||
}
|
||||
|
||||
|
@ -156,7 +122,15 @@
|
|||
|
||||
- (NSString *) currentUserDisplayName
|
||||
{
|
||||
return [self _displayNameForUID: currentUser];
|
||||
SOGoUserManager *um;
|
||||
NSString *s;
|
||||
|
||||
um = [SOGoUserManager sharedUserManager];
|
||||
s = ([currentUser hasPrefix: @"@"]
|
||||
? [currentUser substringFromIndex: 1]
|
||||
: currentUser);
|
||||
|
||||
return [um getFullEmailForUID: s];
|
||||
}
|
||||
|
||||
- (BOOL) canSubscribeUsers
|
||||
|
@ -206,30 +180,15 @@
|
|||
clientObject = [self clientObject];
|
||||
ownerLogin = [clientObject ownerInContext: context];
|
||||
aclsEnum = [[self aclsForObject] objectEnumerator];
|
||||
currentUID = [[aclsEnum nextObject] objectForKey: @"c_uid"];
|
||||
while (currentUID)
|
||||
{
|
||||
while ((currentUID = [[aclsEnum nextObject] objectForKey: @"c_uid"]))
|
||||
if ([currentUID isEqualToString: ownerLogin]
|
||||
|| [savedUIDs containsObject: currentUID])
|
||||
[users removeObject: currentUID];
|
||||
currentUID = [[aclsEnum nextObject] objectForKey: @"c_uid"];
|
||||
}
|
||||
[clientObject removeAclsForUsers: users];
|
||||
|
||||
return [self jsCloseWithRefreshMethod: nil];
|
||||
}
|
||||
|
||||
- (BOOL) canModifyAcls
|
||||
{
|
||||
SoSecurityManager *mgr;
|
||||
|
||||
mgr = [SoSecurityManager sharedSecurityManager];
|
||||
|
||||
return (![mgr validatePermission: SoPerm_ChangePermissions
|
||||
onObject: [self clientObject]
|
||||
inContext: context]);
|
||||
}
|
||||
|
||||
- (BOOL) isPublicAccessEnabled
|
||||
{
|
||||
return [[SOGoSystemDefaults sharedSystemDefaults]
|
||||
|
|
|
@ -28,9 +28,13 @@
|
|||
"Add..." = "Додати...";
|
||||
"Remove" = "Вилучити";
|
||||
|
||||
"Default Roles" = "Контроль доступу для всіх";
|
||||
"Subscribe User" = "Підписати користувача";
|
||||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Вибачте, для цього об’єкту неможливо налаштувати права доступу.";
|
||||
|
||||
/* generic.js */
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
"Any Authenticated User" = "Any Authenticated User";
|
||||
"Public Access" = "Public Access";
|
||||
"Any user not listed above" = "Any user not listed above";
|
||||
"Anybody accessing this resource from the public area" = "Anybody accessing this resource from the public area";
|
||||
|
||||
"Sorry, the user rights can not be configured for that object." = "Sori, ni all hawliau'r defnyddiwr cael ei newid ar gyfer y gwrthrych hwn.";
|
||||
|
||||
|
|
|
@ -28,21 +28,15 @@
|
|||
var:value="defaultUserID"/>
|
||||
<input type="hidden" name="action" value="saveAcls"/>
|
||||
<input type="hidden" name="folderID" id="folderID" var:value="folderID"/>
|
||||
<var:if condition="hasOwner">
|
||||
<label><var:string label:value="Owner:"/>
|
||||
<span class="value"><strong><var:string value="ownerName"/></strong></span></label>
|
||||
</var:if>
|
||||
</div>
|
||||
<div class="userSelector" id="userRoles">
|
||||
<var:if condition="canModifyAcls">
|
||||
<div id="userSelectorButtons">
|
||||
<a href="#" id="aclAddUser" class="smallToolbarButton"><span>
|
||||
<img rsrc:src="add-contact.gif" label:title="Add..." /></span></a>
|
||||
<a href="#" id="aclDeleteUser" class="smallToolbarButton"><span>
|
||||
<img rsrc:src="remove-contact.gif" label:title="Remove" /></span></a>
|
||||
</div>
|
||||
</var:if>
|
||||
<ul id="userList" multiselect="yes">
|
||||
<ul id="userList">
|
||||
<var:foreach list="usersForObject" item="currentUser"
|
||||
><li var:id="currentUser" class="normal-user">
|
||||
<span class="userFullName"
|
||||
|
|
|
@ -12,30 +12,15 @@ DIV.acls LABEL
|
|||
{ white-space: nowrap;
|
||||
width: 100%; }
|
||||
|
||||
DIV.userSelector
|
||||
#userRoles
|
||||
{ position: absolute;
|
||||
top: 3em;
|
||||
top: 5px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
height: 100px; }
|
||||
|
||||
DIV#userSelectorHeader
|
||||
{ margin: 1em 0 0.5em 1em; }
|
||||
|
||||
DIV#userSelector SPAN
|
||||
{ display: block; }
|
||||
|
||||
A#defaultRolesBtn
|
||||
{ float: right;
|
||||
margin-right: 1em;
|
||||
margin-top: 5px;}
|
||||
|
||||
DIV#userRoles
|
||||
{ height: 100%; }
|
||||
bottom: 0px; }
|
||||
|
||||
#userSelectorButtons
|
||||
{ margin-left: 1em;
|
||||
{ margin-left: 5px;
|
||||
padding-bottom: 2px; }
|
||||
|
||||
UL#userList
|
||||
|
@ -43,7 +28,7 @@ UL#userList
|
|||
left: 0px;
|
||||
right: 0px;
|
||||
top: 40px;
|
||||
bottom: 33px;
|
||||
bottom: 0px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
|
@ -70,10 +55,12 @@ UL#userList LI.normal-user
|
|||
{ background-image: url("abcard.png"); }
|
||||
|
||||
UL#userList LI.any-user
|
||||
{ background-image: url("abcard-anyone.png"); }
|
||||
{ background-image: url("abcard-anyone.png");
|
||||
font-style: italic; }
|
||||
|
||||
UL#userList LI.anonymous-user
|
||||
{ background-image: url("abcard-anonymous.png"); }
|
||||
{ background-image: url("abcard-anonymous.png");
|
||||
font-style: italic; }
|
||||
|
||||
DIV#userSelectorButtons A.smallToolbarButton
|
||||
{ float: left; }
|
||||
|
|
|
@ -20,7 +20,6 @@ function addUser(userName, userID) {
|
|||
var count = lis.length - 1;
|
||||
var nextLi = null;
|
||||
while (count > -1 && !nextLi) {
|
||||
log("current li: " + lis[count].id);
|
||||
if (lis[count].hasClassName("normal-user")) {
|
||||
nextLi = lis[count+1];
|
||||
}
|
||||
|
@ -187,10 +186,14 @@ function onAclLoadHandler() {
|
|||
var userNode = nodeForUser(_("Any Authenticated User"),
|
||||
defaultUserID);
|
||||
userNode.addClassName("any-user");
|
||||
userNode.setAttribute("title",
|
||||
_("Any user not listed above"));
|
||||
ul.appendChild(userNode);
|
||||
if (isPublicAccessEnabled && CurrentModule() != "Mail") {
|
||||
userNode = nodeForUser(_("Public Access"), "anonymous");
|
||||
userNode.addClassName("anonymous-user");
|
||||
userNode.setAttribute("title",
|
||||
_("Anybody accessing this resource from the public area"));
|
||||
ul.appendChild(userNode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue