mirror of https://github.com/BOINC/boinc.git
Update AppFiltering.md file
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
parent
95b922c855
commit
8477aaa026
|
@ -1,38 +1,70 @@
|
||||||
You can allow users to select which applications they will receive work for
|
# User app filtering
|
||||||
(by default, they may receive work for any application).
|
|
||||||
|
|
||||||
Each user's list of selected apps is stored in the [project-specific preferences](ProjectSpecificPrefs).
|
BOINC offers two mechanisms allowing users to control the set of apps for which they get jobs.
|
||||||
This is stored in the user.project_specific_prefs database field.
|
The first, described [here](BetaTest), lets you designate apps as "beta test", and lets users opt-in to getting jobs for these apps.
|
||||||
Each 'allowed' application is represented by an element `<app_id>N</app_id>`,
|
The second, "app filtering", lets users select apps individually.
|
||||||
where N is the database ID of the application.
|
|
||||||
If no `<app_id>` elements are present, the user may be sent work for any application.
|
|
||||||
|
|
||||||
This feature is disabled by default.
|
App filtering is disabled by default.
|
||||||
To enable it, edit your html/project/project_specific_prefs.inc to contain
|
To enable it, add to your html/project/project_specific_prefs.inc:
|
||||||
|
```
|
||||||
|
define ('APP_SELECT_PREFS', true);
|
||||||
|
```
|
||||||
|
|
||||||
define ('APP_SELECT_PREFS', true);
|
The app filtering user interface is part of [project-specific preferences](ProjectSpecificPrefs)
|
||||||
|
(i.e., the "Preferences for this project" link on their account page).
|
||||||
|
If the feature is enabled, users are shown:
|
||||||
|
* A list of apps and check boxes.
|
||||||
|
* A checkbox labeled "If no work for selected applications is available, accept work from other applications?".
|
||||||
|
|
||||||
|
Users can specify project preferences separately for each host "venue" (default, work, school, home),
|
||||||
|
allowing them to control which apps run on each host.
|
||||||
|
|
||||||
|
If no apps are selected, there is no restriction: the user can be sent jobs for any app.
|
||||||
|
When you first enable app filtering, no apps are selected.
|
||||||
|
Hence all users can get all apps.
|
||||||
|
Post a news item to notify users that app filtering is available.
|
||||||
|
|
||||||
|
# Defining default app selection
|
||||||
|
|
||||||
|
Suppose you want to define a default other than enabling all apps.
|
||||||
|
For new users you can do this by adding some lines to your
|
||||||
|
**html/project/project_specific_prefs.inc**:
|
||||||
|
```
|
||||||
|
function project_specific_prefs_default() {
|
||||||
|
... existing code
|
||||||
|
$x .= "<app_id>ID1</app_id>\n";
|
||||||
|
...
|
||||||
|
$x .= "<app_id>IDn</app_id>\n";
|
||||||
|
```
|
||||||
|
where ID1 ... IDn are the database IDs of the apps to enable by default.
|
||||||
|
|
||||||
|
This specifies default prefs for new users, but it doesn't affect existing users.
|
||||||
|
Setting prefs for existing users, *en masse*, will require some new code; ask David Anderson.
|
||||||
|
|
||||||
# Adding a new app
|
# Adding a new app
|
||||||
|
|
||||||
When you add a new app, it won't be sent to any users who have selected apps.
|
When you add a new app, it won't be sent to any users who have selected apps.
|
||||||
You can change this (i.e. add the new app to the prefs of users who have selected apps)
|
You can change this (i.e. add the new app to the prefs of users who have selected apps)
|
||||||
by running
|
by running
|
||||||
|
```
|
||||||
app_select_edit.php ID
|
app_select_edit.php ID
|
||||||
|
```
|
||||||
in your html/ops directory (where ID is the database ID of the new app).
|
in your html/ops directory (where ID is the database ID of the new app).
|
||||||
We recommend that you test this script for a few individual users
|
We recommend that you test this script for a few individual users
|
||||||
before running it on your whole database;
|
before running it on your whole database;
|
||||||
see the bottom of the script for details on how to do this.
|
see the bottom of the script for details on how to do this.
|
||||||
|
|
||||||
# Warning
|
# Disabling app filtering
|
||||||
|
|
||||||
Once you use application filtering,
|
Currently there's no way to disable app filtering;
|
||||||
currently there is no easy way to cancel it:
|
if you undefine APP_SELECT_PREFS, the GUI will go away
|
||||||
users who have non-empty app lists will continue to
|
but existing prefs will continue to be enforced.
|
||||||
be filtered even if you remove app filtering from your PHP code.
|
To fix this we'll need to add a scheduler flag to disable app filtering;
|
||||||
The only ways to fully undo app filtering are:
|
if you need this, ask me (David Anderson).
|
||||||
|
|
||||||
|
# Implementation
|
||||||
|
|
||||||
|
Each user's list of selected apps is stored in the user.project_specific_prefs database field.
|
||||||
|
Each 'allowed' application is represented by an element ```<app_id>N</app_id>```,
|
||||||
|
where N is the database ID of the application.
|
||||||
|
|
||||||
* write a script to remove all <app_id> elements from the XML in the database
|
|
||||||
* modify the scheduler so that it takes a configuration flag turning off app filtering.
|
|
Loading…
Reference in New Issue