- updated to the new pikotools api (child spaces were removed)
some plugins need to be fixed yet: ticket, gallery, group, menu - added current user to default models as "user" - renamed in User: super_user -> is_super_user, env -> admin_env, pass_hash_salted -> is_pass_hash_salted - now Users class has a WinixModel as a base class some plugin calls have to be fixed yet - added UserWrapper model with a pointer to User class - removed from ItemContent: methods for accessing 'meta' and 'admin_meta', now ezc can iterate through Space classes - fixed in env winix function: if there is "changeuser" parameter then we should only switch the user (not save anything)
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#include "templates.h"
|
||||
#include "core/misc.h"
|
||||
#include "functions/functions.h"
|
||||
#include "miscspace.h"
|
||||
|
||||
namespace Winix
|
||||
{
|
||||
@@ -121,7 +120,7 @@ bool result = true;
|
||||
{
|
||||
// rm for the root dir
|
||||
// only the superuser can do it
|
||||
if( !cur->session->puser || !cur->session->puser->super_user )
|
||||
if( !cur->session->puser || !cur->session->puser->is_super_user )
|
||||
result = false;
|
||||
}
|
||||
else
|
||||
@@ -270,7 +269,7 @@ void dir_childs_tab_user(Info & i)
|
||||
User * puser = system->users.GetUser(user_id);
|
||||
|
||||
if( puser )
|
||||
i.out << puser->name;
|
||||
i.out << puser->login;
|
||||
else
|
||||
{
|
||||
i.out << "~";
|
||||
@@ -293,7 +292,7 @@ void dir_childs_tab_group(Info & i)
|
||||
Group * pgroup = system->groups.GetGroup(group_id);
|
||||
|
||||
if( pgroup )
|
||||
i.out << pgroup->name;
|
||||
i.out << pgroup->login;
|
||||
else
|
||||
i.out << group_id;
|
||||
}
|
||||
@@ -370,7 +369,7 @@ void dir_last_user(Info & i)
|
||||
User * puser = system->users.GetUser(cur->request->dir_tab.back()->item_content.user_id);
|
||||
|
||||
if( puser )
|
||||
i.out << puser->name;
|
||||
i.out << puser->login;
|
||||
else
|
||||
{
|
||||
i.out << "~";
|
||||
@@ -468,61 +467,61 @@ void dir_last_meta_str(Info & i)
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void dir_last_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
}
|
||||
//void dir_last_meta(Info & i)
|
||||
//{
|
||||
// space_value(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_meta_tab(Info & i)
|
||||
//{
|
||||
// space_list_tab(i, cur->request->dir_tab.back()->item_content.meta);
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_meta_tab_value(Info & i)
|
||||
//{
|
||||
// space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
//}
|
||||
//
|
||||
//
|
||||
//
|
||||
//void dir_last_meta_tab_has_next(Info & i)
|
||||
//{
|
||||
// space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta, L"dir_last_meta_tab");
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
void dir_last_admin_meta_str(Info & i)
|
||||
{
|
||||
cur->request->dir_tab.back()->item_content.meta_admin.serialize_to_space_stream(i.out, true);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta(Info & i)
|
||||
{
|
||||
space_value(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab(Info & i)
|
||||
{
|
||||
space_list_tab(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_value(Info & i)
|
||||
{
|
||||
space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
}
|
||||
|
||||
|
||||
void dir_last_admin_meta_tab_has_next(Info & i)
|
||||
{
|
||||
space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
}
|
||||
//void dir_last_admin_meta_str(Info & i)
|
||||
//{
|
||||
// cur->request->dir_tab.back()->item_content.meta_admin.serialize_to_space_stream(i.out, true);
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_admin_meta(Info & i)
|
||||
//{
|
||||
// space_value(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_admin_meta_tab(Info & i)
|
||||
//{
|
||||
// space_list_tab(i, cur->request->dir_tab.back()->item_content.meta_admin);
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_admin_meta_tab_value(Info & i)
|
||||
//{
|
||||
// space_list_tab_value(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
//}
|
||||
//
|
||||
//
|
||||
//void dir_last_admin_meta_tab_has_next(Info & i)
|
||||
//{
|
||||
// space_list_tab_has_next(i, cur->request->dir_tab.back()->item_content.meta_admin, L"dir_last_admin_meta_tab");
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user