/*
** Copyright (c) 2007 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the Simplified BSD License (also
** known as the "2-Clause License" or "FreeBSD License".)
** This program is distributed in the hope that it will be useful,
** but without any warranty; without even the implied warranty of
** merchantability or fitness for a particular purpose.
**
** Author contact information:
** drh@hwaci.com
** http://www.hwaci.com/drh/
**
*******************************************************************************
**
** Implementation of the Setup page
*/
#include "config.h"
#include
}
/*
** WEBPAGE: setup
**
** Main menu for the administrative pages. Requires Admin privileges.
*/
void setup_page(void){
login_check_credentials();
if( !g.perm.Setup ){
login_needed(0);
}
style_header("Server Administration");
/* Make sure the header contains
if( zLink && zLink[0] ){
@ %h(zTitle)
}else{
@ %h(zTitle)
}
@ %h(zDesc)
WARNING: Device "/dev/null" is not available @ for reading and writing.
} if( access("/dev/urandom", R_OK) ){ @WARNING: Device "/dev/urandom" is not available @ for reading. This means that the pseudo-random number generator used @ by SQLite will be poorly seeded.
} #endif @
@ Users:
@
|
@ Notes:
@
|
@ User %h(zLogin) has Setup privileges and you only have Admin privileges @ so you are not permitted to make changes to %h(zLogin). @
@ The Setup user can make arbitrary @ configuration changes. An Admin user @ can add other users and change user privileges @ and reset user passwords. Both automatically get all other privileges @ listed below. Use these two settings with discretion. @
@ The "N" subscript suffix @ indicates the privileges of nobody that @ are available to all users regardless of whether or not they are logged in. @
@ The "A" subscript suffix @ indicates the privileges of anonymous that @ are inherited by all logged-in users. @
@ The "D" subscript suffix @ indicates the privileges of developer that @ are inherited by all users with the @ Developer privilege. @
@ The "R" subscript suffix @ indicates the privileges of reader that @ are inherited by all users with the Reader @ privilege. @
@ The Delete privilege give the user the @ ability to erase wiki, tickets, and attachments that have been added @ by anonymous users. This capability is intended for deletion of spam. @ The delete capability is only in effect for 24 hours after the item @ is first posted. The Setup user can @ delete anything at any time. @
@ The Hyperlinks privilege allows a user @ to see most hyperlinks. This is recommended ON for most logged-in users @ but OFF for user "nobody" to avoid problems with spiders trying to walk @ every diff and annotation of every historical check-in and file. @
@ The Zip privilege allows a user to @ see the "download as ZIP" @ hyperlink and permits access to the /zip page. This allows @ users to download ZIP archives without granting other rights like @ Read or @ Hyperlink. The "z" privilege is recommended @ for user nobody so that automatic package @ downloaders can obtain the sources without going through the login @ procedure. @
@ The Check-in privilege allows remote @ users to "push". The Check-out privilege @ allows remote users to "pull". The Clone @ privilege allows remote users to "clone". @
@ The Read Wiki, @ New Wiki, @ Append Wiki, and @ Write Wiki privileges control access to wiki pages. The @ Read Ticket, @ New Ticket, @ Append Ticket, and @ Write Ticket privileges control access @ to trouble tickets. @ The Ticket Report privilege allows @ the user to create or edit ticket report formats. @
@ Users with the Password privilege @ are allowed to change their own password. Recommended ON for most @ users but OFF for special users developer, @ anonymous, @ and nobody. @
@ The EMail privilege allows the display of @ sensitive information such as the email address of users and contact @ information on tickets. Recommended OFF for @ anonymous and for @ nobody but ON for @ developer. @
@ The Attachment privilege is needed in @ order to add attachments to tickets or wiki. Write privilege on the @ ticket or wiki is also required. @
@ Login is prohibited if the password is an empty string. @
@ No login is required for user nobody. The @ capabilities of the nobody user are @ inherited by all users, regardless of whether or not they are logged in. @ To disable universal access to the repository, make sure that the @ nobody user has no capabilities @ enabled. The password for nobody is ignored. @
@ Login is required for user anonymous but the @ password is displayed on the login screen beside the password entry box @ so anybody who can read should be able to login as anonymous. @ On the other hand, spiders and web-crawlers will typically not @ be able to login. Set the capabilities of the @ anonymous @ user to things that you want any human to be able to do, but not any @ spider. Every other logged-in user inherits the privileges of @ anonymous. @
@ The developer user is intended as a template @ for trusted users with check-in privileges. When adding new trusted users, @ simply select the developer privilege to @ cause the new user to inherit all privileges of the @ developer @ user. Similarly, the reader user is a @ template for users who are allowed more access than @ anonymous, @ but less than a developer. @
%s(zErrMsg)
} zGroup = login_group_name(); if( zGroup==0 ){ @This repository (in the file named "%h(zSelfRepo)") @ is not currently part of any login-group. @ To join a login group, fill out the form below.
@ @ }else{ Stmt q; int n = 0; @This repository (in the file "%h(zSelfRepo)") @ is currently part of the "%h(zGroup)" login group. @ Other repositories in that group are:
@Project Name | @ | Repository File | ||
---|---|---|---|---|
%d(n). | @ | %h(zTitle) | %h(zRepo) |
The "Document Glob List" is a comma- or newline-separated list @ of GLOB expressions that identify all documents within the source @ tree that are to be searched when "Document Search" is enabled. @ Some examples: @
*.wiki,*.html,*.md,*.txt | @ | Search all wiki, HTML, Markdown, and Text files |
doc/*.md,*/README.txt,README.txt | @ | Search all Markdown files in the doc/ subfolder and all README.txt @ files. |
* | Search all checked-in files | |
(blank) | @ | Search nothing. (Disables document search). |
When searching documents, use the versions of the files found at the @ type of the "Document Branch" branch. Recommended value: "trunk". @ Document search is disabled if blank. @
Currently using an SQLite FTS4 search index. This makes search @ run faster, especially on large repositories, but takes up space.
onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0); @@ }else{ @
The SQLite FTS4 search index is disabled. All searching will be @ a full-text scan. This usually works fine, but can be slow for @ larger repositories.
onoff_attribute("Use Porter Stemmer","search-stemmer","ss",0,0); @} @