the first part of reimplementing has been done
now we have app object and singletons are only: log logn plugin and app git-svn-id: svn://ttmath.org/publicrep/winix/trunk@628 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
57
functions/privchanger.h
Executable file
57
functions/privchanger.h
Executable file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef headerfilecmslucontentprivchanger
|
||||
#define headerfilecmslucontentprivchanger
|
||||
|
||||
|
||||
#include "core/request.h"
|
||||
#include "core/system.h"
|
||||
#include "core/db.h"
|
||||
|
||||
|
||||
|
||||
class PrivChanger
|
||||
{
|
||||
public:
|
||||
|
||||
bool CheckAccess();
|
||||
void Change(bool change_owner_, bool change_priv_);
|
||||
|
||||
void SetRequest(Request * prequest);
|
||||
void SetSystem(System * psystem);
|
||||
void SetDb(Db * pdb);
|
||||
|
||||
private:
|
||||
|
||||
Request * request;
|
||||
System * system;
|
||||
Db * db;
|
||||
|
||||
long user_id_file, group_id_file, user_id_dir, group_id_dir;
|
||||
int priv_file, priv_dir;
|
||||
bool subdirectories;
|
||||
bool change_owner, change_priv;
|
||||
|
||||
bool ChangeOwner(Item & item, long user_id, long group_id);
|
||||
bool ChangePrivileges(Item & item, int privileges);
|
||||
void ChangePriv(Item & item, long user_id, long group_id, int privileges);
|
||||
void PrivLogStart(const char * what, long user, long group, int priv);
|
||||
void PrivLog(const char * what, long id, const std::string & url);
|
||||
void PrivFilesInDir(long parent_id);
|
||||
void PrivDir(long parent_id);
|
||||
bool ReadPriv(const char * user_in, const char * group_in, const char * priv_in,
|
||||
long & user_id, long & group_id, int & priv);
|
||||
void PrivDir();
|
||||
void PrivOneItem();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user