added: TextStream<> DbTextStream<> and HtmlTextStream<> have operator<<(Space&) now
added: to db: bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single)
added: environment variables for users
User::env (of type Space) and
User::aenv (of type Space) for admin variables (can be changed only by a super user)
added: winix function 'env'
for changing User::env and User::aenv ('env' winix function with a 'a' parameter)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@790 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -107,6 +107,43 @@ void user_can_use_raw(Info & i)
|
||||
|
||||
|
||||
|
||||
|
||||
static size_t user_index = 0;
|
||||
|
||||
void user_tab(Info & i)
|
||||
{
|
||||
user_index = i.iter;
|
||||
i.res = user_index < system->users.Size();
|
||||
}
|
||||
|
||||
|
||||
void user_tab_id(Info & i)
|
||||
{
|
||||
if( user_index < system->users.Size() )
|
||||
i.out << system->users[user_index].id;
|
||||
}
|
||||
|
||||
|
||||
void user_tab_name(Info & i)
|
||||
{
|
||||
if( user_index < system->users.Size() )
|
||||
i.out << system->users[user_index].name;
|
||||
}
|
||||
|
||||
|
||||
void user_tab_is_super_user(Info & i)
|
||||
{
|
||||
if( user_index < system->users.Size() )
|
||||
i.res = system->users[user_index].super_user;
|
||||
}
|
||||
|
||||
|
||||
void user_tab_is_current(Info & i)
|
||||
{
|
||||
if( user_index < system->users.Size() && cur->session->puser )
|
||||
i.res = (system->users[user_index].id == cur->session->puser->id);
|
||||
}
|
||||
|
||||
} // namespace TemplatesFunctions
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user