Monotone-Parent: 7d51192a79be7bb49af7def9e40586067798f33c

Monotone-Revision: 5b58952c744a56c2daa202719e938af43febea1a

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-01T20:54:54
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-01 20:54:54 +00:00
parent 638f58661c
commit 21ddea5959
2 changed files with 22 additions and 0 deletions
+18
View File
@@ -81,6 +81,19 @@
return [userRights containsObject: SOGoRole_ObjectViewer];
}
- (void) setUserCanReadObjects: (BOOL) userCanReadObjects
{
if (userCanReadObjects)
[self appendRight: SOGoRole_ObjectReader];
else
[self removeRight: SOGoRole_ObjectReader];
}
- (BOOL) userCanReadObjects
{
return [userRights containsObject: SOGoRole_ObjectReader];
}
- (void) updateRights
{
WORequest *request;
@@ -102,6 +115,11 @@
else
[self removeRight: SOGoRole_ObjectViewer];
if ([[request formValueForKey: @"ObjectReader"] length] > 0)
[self appendRight: SOGoRole_ObjectReader];
else
[self removeRight: SOGoRole_ObjectReader];
if ([[request formValueForKey: @"ObjectEraser"] length] > 0)
[self appendRight: SOGoRole_ObjectEraser];
else