diff --git a/UI/Scheduler/UIxCalUserRightsEditor.h b/UI/Scheduler/UIxCalUserRightsEditor.h index 2a655ad5f..a0d0d74d4 100644 --- a/UI/Scheduler/UIxCalUserRightsEditor.h +++ b/UI/Scheduler/UIxCalUserRightsEditor.h @@ -39,10 +39,8 @@ - (NSArray *) rightTypes; -- (void) setUserCanCreateObjects: (BOOL) userCanCreateObjects; - (BOOL) userCanCreateObjects; -- (void) setUserCanEraseObjects: (BOOL) userCanEraseObjects; - (BOOL) userCanEraseObjects; @end diff --git a/UI/Scheduler/UIxCalUserRightsEditor.m b/UI/Scheduler/UIxCalUserRightsEditor.m index 097329003..f7265cbee 100644 --- a/UI/Scheduler/UIxCalUserRightsEditor.m +++ b/UI/Scheduler/UIxCalUserRightsEditor.m @@ -155,6 +155,11 @@ @"Responder", @"Modifier", nil]); } +- (NSArray *) rightTypes +{ + return [NSArray arrayWithObjects: @"Public", @"Confidential", @"Private", nil]; +} + - (void) setCurrentRight: (NSString *) newCurrentRight { ASSIGN (currentRight, newCurrentRight); @@ -171,4 +176,14 @@ [NSString stringWithFormat: @"label_%@", currentRight]]; } +- (BOOL) userCanCreateObjects +{ + return [userRights containsObject: SOGoRole_ObjectCreator]; +} + +- (BOOL) userCanEraseObjects +{ + return [userRights containsObject: SOGoRole_ObjectEraser]; +} + @end