start working on User and Group classes

- User and Group has been moved to 'models' directory
- removed UserPass struct (passwords fields were put to User struct)
not working yet, we need support for binary blobs in morm
This commit is contained in:
2021-04-30 01:34:48 +02:00
parent ccda2bc2fd
commit 4277f90bad
29 changed files with 363 additions and 200 deletions

View File

@@ -5,7 +5,7 @@
*/
/*
* Copyright (c) 2012-2014, Tomasz Sowa
* Copyright (c) 2012-2021, Tomasz Sowa
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -52,22 +52,18 @@ public:
Env();
bool EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
bool EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
bool HasAccess();
void MakePost();
// used mainly by templates
// can return a null pointer
User * GetUser();
private:
PT::SpaceParser conf_parser;
PT::Space space;
User * puser;
size_t req_id;
bool EditAdminEnv(const std::wstring & env_str, bool use_ses_log = false);
bool EditEnv(const std::wstring & env_str, bool use_ses_log = false);
bool Parse(const std::wstring & env_str);
void SaveEnv();