Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

STUBSecurityPlugin.h

00001 /*
00002    Copyright (C) 2002 the Strongroom project
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    @author Wouter de Vries
00010    @author Ewald Snel
00011 */ 
00012 
00013 #ifndef __STUBSECURITYPLUGIN_H
00014 #define __STUBSECURITYPLUGIN_H
00015 
00016 #include <string>
00017 
00018 #include <SecurityPlugin.h>
00019 
00020 
00025 class STUBSecurityPlugin : public SecurityPlugin { public:
00026 
00027     STUBSecurityPlugin( const Config &cfg );
00028     ~STUBSecurityPlugin();
00029 
00030     bool init();
00031 
00032     void getLoginChallenge( string username, string &challenge );
00033 
00034     bool hasReadPermission( NumID userid, NumID docid );
00035     bool hasWritePermission( NumID userid, NumID docid );
00036     bool hasDeletePermission( NumID userid, NumID docid );
00037 
00038     CoreError changeUserPermission( NumID userid, Permission permission, NumID adminid );
00039     CoreError changeFilePermission( NumID docid, Permission permission, NumID userid );
00040     CoreError filterSearchResults(QueryResult &queryResult);
00041     CoreError login( string username, string challenge, string response, UserProfile &user );
00042     CoreError addUser( const UserProfile &userProfile, string challenge, string password, NumID &userid );
00043     CoreError delUser( NumID userid );
00044     CoreError getUserProfile( NumID userid, UserProfile &userProfile );
00045     CoreError changeUserProfile( NumID userid, const UserProfile &userProfile );
00046     CoreError setPassword( NumID userid, string challenge, string oldPassword, string newPassword );
00047     CoreError clearPassword( NumID userid );
00048     CoreError listUsers( vector<NumID> &users );
00049     CoreError fileCreated( NumID userid, NumID docid, Permission permission );
00050 };
00051 
00052 #endif

Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18