~ubuntu-branches/ubuntu/saucy/sope/saucy

« back to all changes in this revision

Viewing changes to sope-appserver/NGObjWeb/SoObjects/SoUser.h

  • Committer: Package Import Robot
  • Author(s): Jeroen Dekkers
  • Date: 2012-05-09 15:39:17 UTC
  • Revision ID: package-import@ubuntu.com-20120509153917-nr4jlm8mktma1yv3
Tags: upstream-1.3.14
ImportĀ upstreamĀ versionĀ 1.3.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (C) 2002-2005 SKYRIX Software AG
 
3
 
 
4
  This file is part of SOPE.
 
5
 
 
6
  SOPE is free software; you can redistribute it and/or modify it under
 
7
  the terms of the GNU Lesser General Public License as published by the
 
8
  Free Software Foundation; either version 2, or (at your option) any
 
9
  later version.
 
10
 
 
11
  SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
 
12
  WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
13
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
14
  License for more details.
 
15
 
 
16
  You should have received a copy of the GNU Lesser General Public
 
17
  License along with SOPE; see the file COPYING.  If not, write to the
 
18
  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
19
  02111-1307, USA.
 
20
*/
 
21
 
 
22
#ifndef __SoObjects_SoUser_H__
 
23
#define __SoObjects_SoUser_H__
 
24
 
 
25
#import <Foundation/NSObject.h>
 
26
 
 
27
/*
 
28
  SoUser
 
29
  
 
30
  A protocol and a basic implementation of a user object for the SOPE
 
31
  authentication system.
 
32
  
 
33
  Note: the "context" is usually the WOContext, not the "object context"
 
34
  like in Zope. You can get the roles for an object by using 
 
35
  -rolesForObject:inContext:.
 
36
*/
 
37
 
 
38
@class NSException, NSString, NSArray;
 
39
 
 
40
@protocol SoUser
 
41
 
 
42
- (NSString *)login;
 
43
 
 
44
/* returns the names of the roles assigned to the user */
 
45
- (NSArray *)rolesInContext:(id)_ctx;
 
46
 
 
47
/* 
 
48
   Returns the names of the roles assigned to the user including
 
49
   local roles from the object.
 
50
*/
 
51
- (NSArray *)rolesForObject:(id)_object inContext:(id)_ctx;
 
52
 
 
53
@end
 
54
 
 
55
@interface SoUser : NSObject < SoUser >
 
56
{
 
57
  NSString *login;
 
58
  NSArray  *roles;
 
59
}
 
60
 
 
61
- (id)initWithLogin:(NSString *)_login roles:(NSArray *)_roles;
 
62
 
 
63
@end
 
64
 
 
65
#endif /* __SoObjects_SoUser_H__ */