102 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
c2cd8f50c2
firstboot: Use bootstrap for logo styling
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-12-19 16:26:53 +02:00
Sunil Mohan Adapa
ae535268b2
ui: Use common styling to hide logo during firstboot
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-12-19 16:26:52 +02:00
Joseph Nuthalapati
d92ca09e19
framework: Remove module init() functions
Fixes #1906

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-03 18:06:48 -04:00
Sunil Mohan Adapa
2526c98de6
static: Use SVG logo during first wizard welcome step
- This removes the need to ship a 67K file and scales better.

- Rename the file to have lowercase chars only for consistency.

Tests performed:

- Goto home page, see the logo at the bottom properly displayed.

- Goto the first wizard welcome page, notice that the logo is displayed. Also
the dimensions of the image are same as without the change.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:51 -04:00
Sunil Mohan Adapa
e89e2b4a2a
*.html: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:39:19 +02:00
Sunil Mohan Adapa
9368504da5
*.py: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:38:55 +02:00
Alice Kile
eb83e00011
fix formatting issues
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:35 -05:00
Joseph Nuthalapati
815d3ec0e8
firstboot: reading firstboot-wizard-secret file
Explain how to read the firstboot-wizard-secret file using shell
commands. Remove output of the cat command.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-11-18 18:10:24 -05:00
Sunil Mohan Adapa
dbb3558aab
firstboot: Hide left menu during first boot as intended
This seems to be a regression from earlier behavior.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-09-22 08:41:59 +02:00
Joseph Nuthalapati
7cbaec3e26
firstboot: Add new help menu to firstboot navbar
- Refactor the help menu into a django template include.

- Show help menu if user is logged in, instead of after completing firstboot.

Closes: #1517

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
[sunil@medhas.org Rename help-menu.inc to help-menu.inc]
[sunil@medhas.org Use user.is_authenticated instead of another variable]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-17 19:45:48 -07:00
Joseph Nuthalapati
3e619d6882
firstboot: network connections not used, cleanup
No longer showing network connections in firstboot. Removed dead code.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-09-17 19:45:18 -07:00
Sunil Mohan Adapa
fdcbd46513
setup: Move app enabling files to respective apps
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-17 16:20:54 -04:00
Sunil Mohan Adapa
d767e64703
ui: Show help nav item text when navbar is collapsed
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-01-18 11:47:46 +05:30
Prachi Srivastava
5d68f6bf52
Replace glyphicons with forkawesome icons
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-01-14 17:37:58 -08:00
Joseph Nuthalapati
ba9af6ddff
firstboot: Prompt for secret during firstboot welcome
- A freshly installed FreedomBox can be hijacked by a third party and an admin
  account can be created which can be used to inject malware or simply take over
  the instance. Password protecting the firstboot step is a good way to avoid
  this. A secret will be displayed to the user as soon as the Plinth package
  is installed, which they have to enter during firstboot welcome step. Also,
  writing this to a file in plinth's home in case the user loses it.
- This protection is not applicable for images built by freedom-maker and for
  Amazon Machine Images.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-04 20:22:54 -04:00
Sunil Mohan Adapa
e43df173ca
first_boot: Remove unnecessary content sizing
Signed-off-by: Manish Tripathy <manisht@thougtworks.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-06-18 20:24:07 +05:30
Sunil Mohan Adapa
1da594c32d
Support Django 2.0
This is the final change required for Django 2.0 support. Instead of using
MIDDLEWARE_CLASSES use MIDDLEWARE setting. Support for new style middleware was
provided in version 0.3.0, so depend on that version. Django built-in middleware
already supports new style and plinth middleware will now support new style.

The actual semantics of the middleware don't need changes. See:
https://docs.djangoproject.com/en/2.0/topics/http/middleware/#upgrading-pre-django-1-10-style-middleware

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-03-12 17:27:26 -04:00
Sunil Mohan Adapa
8f0e2d6381
Rename Plinth to FreedomBox in module doc strings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:25 -05:00
Sunil Mohan Adapa
dea4af17fb
Rename Plinth to FreedomBox in license headers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-02-16 20:10:09 -05:00
Joseph Nuthalapati
4826f70343
firstboot: Fix caching issue in collecting first_boot steps
- Created a django singal to indicate that a setup happened

- Clearing the cached list of firstboot_steps each time the above signal is sent

Closes #1193.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-01-30 10:48:48 +05:30
Hemanth Kumar Veeranki
3de4c5639f
Remove help from navbar before firstboot complete
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>

Reviewed-by: Johannes Keyser <johanneskeyser@posteo.de>
2017-08-13 01:39:24 +02:00
James Valleroy
89ceb98273
first_boot: Remove Networks button, add link to text 2017-05-16 00:23:14 -04:00
Johannes Keyser
62c46b4186
first_boot: erase network graph and warning on WiFi passwords 2017-05-16 00:23:11 -04:00
Johannes Keyser
b6ce07d962
first_boot: no exclamation mark in button 2017-05-16 00:23:09 -04:00
Johannes Keyser
ee0679fc5a
first_boot: less casual language 2017-05-16 00:23:06 -04:00
Johannes Keyser
2ad579dbb2
first_boot: de-bloat first welcome screen, #830 2017-05-16 00:23:00 -04:00
Sunil Mohan Adapa
ee7cc98fee
apps, system: Remove modules and merge into main
- Remove apps and system modules and merge their views into main views.

- Move main_menu from cfg into menu.py.

- Remove dependencies of other modules on apps and system modules.

- Update tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2017-05-05 22:31:45 -04:00
James Valleroy
e5b32aa6b4
Add TODO for confusing firstboot step id
Update changelog.
2017-01-02 15:05:27 -05:00
fonfon
e1aa78d25a
Firstboot, KVStore: merge old firstboot state fields
- use a migration to merge the old 'firstboot_state' and 'setup_state'
  fields into 'firstboot_completed' which is a more accurate name
- introduce kvstore.delete()
2017-01-02 15:05:24 -05:00
fonfon
3af82ab14e
Firstboot: minor variable renaming and cleanup 2017-01-02 15:05:20 -05:00
James Valleroy
9da23fa560
firstboot: Only add steps from modules if they have completed setup 2016-12-04 15:24:54 -05:00
Sunil Mohan Adapa
f457a0bdd3
first_boot: Fix various issues and refactor
- Fix major regression so that steps can submitted multiple times in
  case of errors.

- Don't serve the welcome page (and other pages) only once.  Show it
  until action is an taken.  This does not apply to the final step.

- Eliminate all coupling of one first boot step on another.

- Move first boot helper methods to __init__.py instead of middleware as
  it is more generic than middleware.

- Implement caching the first boot state to avoid an SQL query on every
  page load.  The down side is that if first boot state is modified in
  the backend DB outside Plinth, Plinth will need to be restarted to
  catch the modified value.

- Mark some methods as private.

- Refactor middleware code for slightly more simplicity.

- Don't show sidebar in pagekite first boot step.  Set width like other
  pages.
2016-12-04 15:24:48 -05:00
Sunil Mohan Adapa
56686b7148
firstboot: Rename views/urls to be non-numeric 2016-12-04 15:24:36 -05:00
Sunil Mohan Adapa
c37aa0fbd5
firstboot: Indentation & styling fixes
pycodestyle version used is 2.1.0 with default arguments.
2016-12-04 15:24:31 -05:00
James Valleroy
cf0e8219af
Use new setup state in template tag 2016-11-03 22:32:17 -04:00
Hemanth Kumar Veeranki
6011a7adfa
Made Suggested Changes 2016-11-03 22:06:08 -04:00
Hemanth Kumar Veeranki
0290f68ae6
Removed redirection for login and help urls
Changed the redirection in state0 template
2016-11-03 22:06:05 -04:00
Hemanth Kumar Veeranki
0332d4489e
Added code for modules to register for first_boot #529 2016-11-03 22:06:00 -04:00
Sunil Mohan Adapa
e719966c4b
users: Refactor valid user name checking for reuse
- Supress output from getent

- More accurate message
2016-08-12 19:32:19 +05:30
James Valleroy
c8c6bc377b
users: Add list of restricted usernammes
List is derived from optional services installed.
2016-08-12 18:48:16 +05:30
James Valleroy
3a69958165
users: Avoid username conflicts with system users
When creating or renaming a user, check if the new username is in use by
any system user.
2016-08-12 18:47:52 +05:30
Sunil Mohan Adapa
18996b5c56
Import urlresolvers from django.urls
In Django 1.10, django.core.urlresolvers is available from
django.urls. Use it.
2016-08-11 18:03:00 -04:00
Sunil Mohan Adapa
09ba42aa7c
Replace render_to_response() with render()
In Django 1.10, render_to_response no longer has context_instance
argument.  It's use is not recommended anyway.  Replace it with render()
method.
2016-08-11 18:02:52 -04:00
Sunil Mohan Adapa
2afae80dd8
security: Recommend/notify about restricted logins
- Do stricter matches when editing configuration file.  Earlier
  mechanism would match comments etc.

- Move action methods to module core from views.

- During first boot, notify users that console login is restricted and
  that they can changed that from security settings.

- Recommend enabling conosle login restrictions.  Add message about why
  console restrictions are important.

- Show title in security module.
2016-07-09 22:42:20 +05:30
James Valleroy
82c27aabf3
first_boot: Enable restricted console logins 2016-07-09 22:41:53 +05:30
Sunil Mohan Adapa
c3c44ab379
firstboot: Minor Danube PageKite fixes
- Fix message internationalization with formatting and laziness.

- Styling fixes.

- Simplify Subdomain widget.

- Update messages for grammer and consistency.
2016-03-13 23:32:26 +05:30
fonfon
435f980c6f
firstboot: freedombox.me pagekite vouchers
- Show PageKite voucher only if cfg.danube_edition is enabled
2016-03-13 23:32:20 +05:30
Sunil Mohan Adapa
60c4c17f94
firstboot: Use new setup mechanism 2016-02-13 13:52:29 +05:30
Caly
15312fe595
Update messages for simplicity/consistency/grammer
- Closes #375 and #380.

- More use of configurable brand name.
2016-01-24 12:14:25 +05:30
Sunil Mohan Adapa
4602c5bfce
Use translated brand name in templates
Using brand name directly from configuration means that it can't be
easily translated.  Instead use the translated brand name sent in my the
context processor.
2016-01-24 00:37:01 +05:30