2 Copyright (C) 2002-2005 SKYRIX Software AG
4 This file is part of SOPE.
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
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.
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
22 #ifndef __SoObjects_SoUser_H__
23 #define __SoObjects_SoUser_H__
25 #import <Foundation/NSObject.h>
30 A protocol and a basic implementation of a user object for the SOPE
31 authentication system.
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:.
38 @class NSException, NSString, NSArray;
44 /* returns the names of the roles assigned to the user */
45 - (NSArray *)rolesInContext:(id)_ctx;
48 Returns the names of the roles assigned to the user including
49 local roles from the object.
51 - (NSArray *)rolesForObject:(id)_object inContext:(id)_ctx;
55 @interface SoUser : NSObject < SoUser >
61 - (id)initWithLogin:(NSString *)_login roles:(NSArray *)_roles;
65 #endif /* __SoObjects_SoUser_H__ */