763 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
61fefcff01 Minor styling and doc updates related to module cleanup 2014-12-14 17:27:11 +05:30
Sunil Mohan Adapa
90203986f2 Remove modules 'expert_mode' and 'lib'.
The login/logout URLs are now in the 'users' module.
2014-12-14 17:26:05 +05:30
Sunil Mohan Adapa
3abc5e9212 Require logged-in user for user administration 2014-12-14 17:24:23 +05:30
Sunil Mohan Adapa
10496d89a5 Refactor templatetags and tests for styling 2014-12-14 08:51:13 +05:30
Sunil Mohan Adapa
d4b98b9e48 Sylting updates in user module for consistency 2014-12-14 00:32:22 +05:30
Sunil Mohan Adapa
c6a29a8915 Don't mark ContextMixin as abstract
- Django abstract bases seems to apply only for Models.

- Django itself does not use abtract marking for its own generic view
  mixins.
2014-12-14 00:32:22 +05:30
Sunil Mohan Adapa
a625d67152 Show active status in user list, increase delete button size
- Separate out styling details
2014-12-14 00:32:22 +05:30
Sunil Mohan Adapa
82c2785272 Auto-generate model form for user updation
- Remove the custom UserForm
2014-12-14 00:32:14 +05:30
Sunil Mohan Adapa
6612fffdb5 Update user module URLS
- It is more restish to have /user/1/delete rather than /user/delete/1.
- End all URLs with a slash.
2014-12-14 00:19:45 +05:30
Sunil Mohan Adapa
20e03c700a Update UI strings in user module
- Fixed an i18n issue.
- Marked more messages for i18n.
2014-12-14 00:18:33 +05:30
Sunil Mohan Adapa
6dc463ff6e Remove confusing sidebar message during user creation 2014-12-14 00:07:53 +05:30
fonfon
0d2b454b6e os.path.commonprefix is suitable for any strings 2014-12-09 23:38:16 +01:00
fonfon
97fe5714e2 Fix subsubmenu highlighting bug and add tests 2014-12-09 23:32:06 +01:00
fonfon
4b3b3c666a Refactored 'users' module
- allows editing users (currently the groups and username)
- allows any logged-in user to change the passwords of any other users
- improved url highlighting of subsubmenu
2014-12-09 20:49:13 +01:00
Sunil Mohan Adapa
733a4fd139 Minor styling fixes for test coverage script 2014-12-07 11:39:38 +05:30
Sunil Mohan Adapa
5016087d5c Move coverage to test dependency and install it properly
- Coverage should only be required if running tests

- When running test_coverage command all the install dependencies and
  test dependencies should be installed.
2014-12-07 11:38:33 +05:30
Sunil Mohan Adapa
a0cd525b96 Add explicit license from test coverage script
The license on the blog post is GPLv3+.  The derived work can't be of
any other license but GPLv3+.
2014-12-07 11:33:10 +05:30
Sunil Mohan Adapa
3444d5e314 Don't fail setup.py when without coverage module 2014-12-07 11:10:37 +05:30
fonfon
ff36dd1010 print coverage at the end of the test; minor pep8 fixes 2014-12-07 10:40:51 +05:30
Bob Girard
a502da63d5 Add test coverage measurement and reporting
- Implement coverage functionality as a setuptools Command subclass
  (in plinth/tests/coverage/test_coverage.py)
- Register the new 'test_coverage' command in setup.py
- Modify the INSTALL file to specify python3-coverage as a new dependency
- Modify the HACKING file to document the new 'test_coverage' command
- Have git (via .gitignore) ignore the '.coverage' output data file and
  the contents of the 'plinth/tests/coverage/report' directory
2014-12-06 18:14:42 +05:30
Sunil Mohan Adapa
95bf621c08 Update link to wiki during first boot 2014-12-06 17:15:30 +05:30
Sunil Mohan Adapa
f4f594c41a Remove references to editing of users
- We can add that when we have the functionality implemented.

- Our current effort is not have stubs and references unavailable
  features.
2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
100533bee1 Add missing titles to tor and diagnostics pages 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
4b249be175 Reduce pagekite configuration button size 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
2d33b0338e Add missing <p> tags 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
522ece851c Minor indentation fixes in templates 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
057d1063f3 Use <code> tag for commands 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
271011adf6 Rename OwnCloud -> ownCloud 2014-12-06 17:08:38 +05:30
Sunil Mohan Adapa
10a32f43d9 Fix issue with showing installed status of pagekite 2014-12-06 17:08:37 +05:30
Sunil Mohan Adapa
e6b5bed1f3 Use margins or <p> instead of <br /> 2014-12-06 17:08:37 +05:30
fonfon
96a14e3d0d moved 'in-app menu' from the sidebar to the top of the content; some template block renaming 2014-12-06 17:08:37 +05:30
fonfon
e4c11e7d8e show the sidebar with help during first_boot 2014-12-06 17:08:37 +05:30
fonfon
9c95da8751 updated user-edit/delete texts: we don't have any functionality to edit users 2014-12-06 17:08:37 +05:30
fonfon
8d2e2be7fa removed unused template forms.html 2014-12-02 12:54:04 +01:00
fonfon
e2a867901d removed js_block: use page_js or app_js instead 2014-12-02 12:54:04 +01:00
James Valleroy
2751a8e848 Convert xmpp-register action to python. 2014-11-30 15:24:32 +05:30
James Valleroy
e324aa040e Move ejabberd install info to template file. 2014-11-30 15:23:25 +05:30
James Valleroy
39e441e2b9 Add action to check if ejabberd is installed.
If not installed, show instructions on how to install it.
2014-11-30 15:23:25 +05:30
James Valleroy
ac0f0c9eba Show error messages from xmpp-setup and xmpp-register.
Avoid causing plinth to show error page.
2014-11-30 15:23:25 +05:30
Sunil Mohan Adapa
9d6e17660d For SSL redirection, use 301 permanent 2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
e2ca5e0f12 Rewrite Apache configuration files
- Don't hijack the entire SSL site for sake of Plinth.

- Serve both HTTP and HTTPS sites with default configuration.

- plinth-ssl configuration only make SSL compulsory.

- Document modules required for configuration to work properly.

- Don't disable default site during FreedomBox setup run.  This is no
  longer required.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
1b6969a8a6 Rethink how proxied headers are handled
- Request Apache to send X-Forwarded-Proto header.

- Use X-Forwarded-Proto header to understand original protocol
  requested.

- Use X-Forwarded-Host header to understand original host requested.

- Allow any incoming host header so that FreedomBox can have any
  hostname and when user requests for Plint with that hostname, it
  works.

- Don't depend on Apache to rewrite the Location: header.  Instead use
  the original host and original scheme to set proper Location: header.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
eec249d006 Don't preserve Host header during Apache proxying
When Apache proxy forwards a request it usually makes the request to the
backend server with a new Host: header but sends the original host
information using a special header X-FORWARDED-HOST: header.  It is a
common practise.  The backend can be make the choice of which header to
use based on the knowledge that it is running behind a proxy server.

Since hostname of a FreedomBox machine could be anyting and it could
change during the operation of Plinth, having a list of incoming Host:
header values is not going to be easy in Plinth.  If Apache were not to
force override this header, managing list of Host: header values will
become easiler in Plinth.  If Plinth indeed wants to know the original
host name by which user refferred to it, it can use the
X-FORWARDED-HOST: header which is the norm in these situtations.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
5d79ad6dc5 Don't service static files directly from Apache
We are allowing modules to bring their own static content.  If we need
to configure Apache to serve static URLs directly, Apache will have know
all the static URLs generated by all the modules.  If these details are
provided, it will likely effect our modularity.

The current static URL given in Apache configuration is anyway
incorrect.
2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
1e317cfb37 Allow more local IP addresses in Apache configuration 2014-11-30 15:11:50 +05:30
Sunil Mohan Adapa
5b969d9d30 Explicitly write license headers for each source file
The package license (AGPL3+) implicitly indicates the license of each
file.  However, it is desirable to have license headers in each file.
This is the case for many prominent projects like GNU project, Mozilla
etc.
2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
51247dae13 Remove #! from actions.py as it is not meant to run independently 2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
dad4eccbde Remove copyright information in footer for cleaner apperance 2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
750241bf8a Update copyright information
More authors have contributed in a significant manner given them
copyright for thier contributions.  Hence changed Plinth copyright to
'Plinth Authors'.  Full list of authors can be obtained from the Git
revision log.
2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
fcc1330318 Relicense __main__.py to AGPLv3+
- There is no point in keeping this one single file as with different
  license from the rest of the package.  This change simplifies things.

- The file has been almost entirely been rewritten for Django, module
  loading, CherryPy static directories etc.

- This change will be pushed with the consent of new authors: fonfon and
  Me.
2014-11-30 14:49:49 +05:30