Commit Graph

27 Commits

Author SHA1 Message Date
Kevin Reed ce5d3ed79f
Merge pull request #2385 from BOINC/dpa_token
web: in download.php, use current login token if recent
2018-03-07 11:11:42 -06:00
David Anderson 3338fcdd19 web: in download.php, use current login token if recent
Generate a new login token only if the current one is older than a day.
That way if a user does several downloads in quick succession
(for whatever reason) autoattach will work with all of them.
2018-02-28 16:27:00 -08:00
David Anderson c6744a830c web: add "show password" checkbox to login form 2018-02-27 16:56:59 -08:00
David Anderson 889271a410 web: remove "forgot email?" link. "Login with authenticator" no longer exists.
Note: you can supply authenticator instead of password in regular login form.
Occasionally a project admin may need to do this to log in as another user.
2018-01-12 12:33:41 -08:00
David Anderson 5d37578ecc Add support for "visible password" checkbox
- make redundant password and country optional in create account.
- fix appearance of form items
- remove unused code
2018-01-08 00:35:53 -08:00
David Anderson 1ac3828563 web: change form_checkboxes() so you can specify the state of each one 2018-01-06 01:07:27 -08:00
David Anderson 76f94b66d7 web: improve password reset form
- call it "Reset password"
- move authenticator-based login to a new file, login_auth.php
  This is intended for admins, not users
- Use bootstrap forms
2017-11-21 15:32:42 -08:00
David Anderson 13f2cda704 Time out login tokens after 1 day
Also add user_id arg to login_token_lookup RPC,
so we don't need to index user.login_token.
Pass user_id to concierge.
2017-11-03 13:07:51 -07:00
David Anderson 328e53d677 Store login tokens in user records instead of separate table 2017-11-02 23:11:55 -07:00
David Anderson 15f28c96b6 Add server-side support for simplified register/download/attach
Add the server parts of the scheme described here:
https://boinc.berkeley.edu/trac/wiki/SimpleAttach

This includes:
- add login_token table and function for creating login tokens
- add Web RPC login_token_lookup.php for mapping token to auth
- change concierge protocol to take project ID and login token
- update download.php so that it gets client version info
    from versions.xml (from BOINC web site)
    and displays buttons with OS name, versions and file sizes
    like on the BOINC download page
- make "register.php" work

I've tested this all the way through downloading the installer file
with the augmented name.
Changes to the installer and client are needed to complete the system.
2017-10-30 21:38:07 -07:00
David Anderson 5c3d3dbdbe Web: change account creation page to use tooltips for details 2017-09-25 22:08:40 -07:00
David Anderson dfe7261cda web: improve button colors and appearance
principles:
- primary action buttons are green (btn-success)
- secondary action buttons are blue (btn-primary)
- potentially risky action buttons are yellow (btn-warning)
- if there are a lot of buttons (e.g. forum posts) use btn-xs
2017-08-20 01:17:21 -07:00
David Anderson 4093be9579 web: fix PHP warning in sending "report post" emails 2017-06-24 14:41:07 -07:00
David Anderson e712c7af9a web: code shuffle, no functional changes
separate user-related code into:
    user.php (web display of accounts)
    user_util.php (creating/deleting accounts)
2017-06-22 01:07:25 -07:00
David Anderson 415ebacbd1 web: encapsulate PHP
In bootstrap.inc there are some functions for creating forms.
They conceal Bootstrap (and HTML itself) from the caller.
I changed a couple of forms (edit user into and create account) to use this API.
There are many other forms that we could change as well.
This is how I'd like the PHP code to evolve:
encapsulate HTML in utility functions.
We have this for tables, forms, and header/footer.

Also finish the NO_COMPUTING changes.
2017-06-20 00:38:11 -07:00
David Anderson 5afcdf0c3c Web: don't request postal code by default
We were asking for postal code (optional) on registration.
The purpose was to let projects study
the geographical distribution of their volunteers.
But AFAIK no one ever did this,
and some volunteers have said (understandably, I think)
that asking for postal code seems like an invasion of privacy.

So I conditioned the postal-code code on a boolean constant POSTAL_CODE.
If you put
define('POSTAL_CODE', true);
in your html/project/project.inc, you'll get the old behavior.
Otherwise users won't see postal-code related stuff any more.
2017-06-05 14:26:42 -07:00
David Anderson 853f8661b3 web: fix function name for country select 2017-02-16 10:59:56 -08:00
David Anderson c2350c7f57 web: try to get Recaptcha working on IE 2017-02-01 22:13:21 -08:00
David Anderson 9d673e1c93 web: appearance tweaks
- use form-control class for text inputs and selects.
    This makes them all full-width, but I guess that's OK.
- use success class (green) for action buttons
- right-align table headings where appropriate
- use <small> instead of text-muted.
- tweak custom CSS to fix link and navbar visited colors
2016-12-04 21:04:23 -08:00
David Anderson 91b4dcdc37 web: make some strings translatable
Also: on default home page, don't show the big green Join button
if the user is logged in; they're presumably running BOINC
on at least one computer.
However, in this case put a Join item in the Project menu
in case this is a new computer and they forgot where to download from.
2016-11-29 00:34:26 -08:00
David Anderson a22b1e3136 web: various tweaks
- make selects 240px wide (kludge)
- in navbar, link user name to home page
- add Project to navbar, more Your Account there
- add maximum-scale to <meta>
2016-11-24 18:01:41 -08:00
David Anderson 7463938995 web: more fixes for dark themes 2016-11-23 02:35:28 -08:00
David Anderson d5167aeec5 web: don't show "forgot email" link for non-compute projects 2015-11-04 11:54:38 -08:00
Christian Beer 72bec2388a Web: rename recaptcha_get_html() because of a conflict with Drupal
When also including an older recaptchalib.php this function gets redefined. Since it is only a wrapper function and only used within BOINC, renaming it is safe.
2015-10-14 12:10:06 +02:00
Nicolás Alvarez cfd1d52c80 Update recaptcha to latest version of the API.
This allows a new simplified captcha that in some cases only makes the user
have to tick a checkbox; no need to type garbled characters or anything.
More info at:
http://googleonlinesecurity.blogspot.com/2014/12/are-you-robot-introducing-no-captcha.html
2015-01-17 00:18:44 -03:00
David Anderson e470620acb web: preliminary support for simplified attach
See http://boinc.berkeley.edu/trac/wiki/SimpleAttach
2015-01-14 09:19:11 -08:00
David Anderson 037f1b3eb2 web: fix PHP errors on empty team search; when delete spam team, delete user too 2015-01-09 10:54:05 -08:00