90 Commits

Author SHA1 Message Date
Swapnil Gupta
615f0d0298
Update in licenses 2016-12-20 17:36:00 -05:00
Swapnil Gupta
699bdbfed6
Revert "Added license for inline js"
This reverts commit ee0d3745107c910e20350fa57c1fec7da7f90563.
2016-12-20 17:35:57 -05:00
Swapnil Gupta
cfe75b57f0
Added license for inline js 2016-12-20 17:35:54 -05:00
Sunil Mohan Adapa
5c75eb9649
dynamicdns: Allow reading status as non-root
Recently dynamic DNS module was fixed to use root ownership and limited
permissions for configuration and status files to avoid other users
reading dynmaic DNS account details.  This caused a regression when
Plinth is being run as non-root user.  This patch runs the commands to
read the current configuration as root user.
2016-10-17 11:49:45 -04:00
Sunil Mohan Adapa
522db2ce4c
dynamicdns: Allow Plinth to run as non-root
When invoking actions, invoke them using sudo so that Plinth itself can
run as non-root.  Most operations require superuser previlage.  Those
that don't require superuser should not be part of the action script and
can be moved to Plinth main.
2016-08-16 18:20:32 -04:00
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
942b23c3c3
dynamicdns: Change 'lookup' to 'look up'
The original patch Nikhil Rayaprolu had this correct.  I have
incorrectly changed it.  Fixing it.
2016-07-28 22:58:00 +05:30
Nikhil Rayaprolu
777dbbe2a7
dynamicdns: Improve label for IP Check URL 2016-07-28 22:51:29 +05:30
Sunil Mohan Adapa
5f548a9e36
packages: Make modules declare managed packages
This can then be used by a privileged action to verify that packages
requested for installation are in fact valid.  This slightly improves
security of those privileged actions.
2016-06-11 12:11:32 -04:00
Sunil Mohan Adapa
fbb2f4c3df
dynamicdns: Move app to system configuration
This app rightfully belongs in system configuration section instead of
the application section.  It is setup once and not used regularly.  It
is not service but enabler for other services.  Closes: #441.
2016-06-07 07:19:04 -04:00
Sunil Mohan Adapa
ad61028a3a
menu: Sort menu items for all locales
Currently menu items are shown in alphabetical order in applications and
no clear order in system configuration.  This is done using static
weights for menu items based on English names that does not work for
other locales.

Sorting can't be done at the time of adding menu items as users of
multiple locales may use the interface at the same time.

Implement a sorting mechanism based on existing order as well as labels
of menu item.  This allows the flexiblity of grouping menu items in
future as it may be need for system configuration.  In case of help menu

Remove sort order for all modules except for help menu as here we want
that specific order.
2016-06-06 17:44:59 -04:00
fonfon
f867ecfb16
Removed (accidentially) duplicate dyndns description 2016-05-11 18:19:46 -04:00
fonfon
f419c28596
Services: Explicitly use ServiceForm and ServiceView
- adapted all modules to not use views.ConfigurationView anymore
- removed templates that are not needed anymore
- no more implicit 'enabled' and 'get_status' functions in __init__.py files
- (more coherent/explicit use of Django functionality)
2016-05-11 18:19:31 -04:00
Sunil Mohan Adapa
a51c784457
Various message fixes
- Capitalize 'Internet' to make it consistent across Plinth.  See:
  https://en.wikipedia.org/wiki/Capitalization_of_%22Internet%22

- Other minor fixes
2016-03-13 18:20:54 -04:00
James Valleroy
767e3c4757
dynamicdns: Make corrections to source strings. 2016-03-12 16:11:55 -05:00
Sunil Mohan Adapa
1842db42da
dynamicdns: Use new setup mechanism 2016-02-13 13:50:54 +05:30
Sunil Mohan Adapa
7f4c5f7410
Make app names as module identifiers
- The last part of the module import path is the module name.  This also
  becomes the Django app name.  Apps names have to be unique.  Hence,
  there is no scope for two different modules with same name but
  different load path to exist in the project.

- Most uses of list of loaded modules are dealing with app names instead
  of full module load path.  This is due to the fact that Django deals
  with app names and not module paths.

- It is also somewhat clumsy to access a loaded module as we are
  re-importing every time to get access module.

- Simplify all of the above by using app names are module identifiers
  and maintaing an ordered dictionary of app names to loadded modules.

- Remove unused imports.

- Minor styling fixes.
2016-02-13 13:49:23 +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
572e68dc36
Make remaining uses of brand name customizable 2016-01-24 00:50:14 +05:30
Ruben Lubbes
841439ba73 Punctuation errors changed after DE language check
Influences all translations, so do not use for 0.7.
2015-12-09 23:55:55 +05:30
Sunil Mohan Adapa
a69f419c3c Make Django urlpatterns list of url()s
- Support for legacy pattern() mechanism will be removed in Django
  1.10.  Currently we see a warning for each Plinth module.
2015-12-05 09:33:23 -05:00
Sunil Mohan Adapa
3df1a88824 Switch to Django i18n for code strings
Django i18n layer is on top of gettext and provide may crucial features
such as per-request locales, lazy translations etc.
2015-11-13 22:08:43 +05:30
Sunil Mohan Adapa
02cd89b60d Internationalize strings in template files 2015-11-13 22:02:17 +05:30
Sunil Mohan Adapa
0b1e97d99c Treat entire input as password
Instead of just the first line.

PEP8 fixes.
2015-08-23 16:24:29 +05:30
Sean Alexandre
21b9a5b02a Passwords now sent over stdin instead of command line.
Fixes Issue #166:
Don't pass passwords on command line
https://github.com/freedombox/Plinth/issues/166

This issue was for 4 modules: Transmission, Pagekite, DynamicDNS, and Ikiwiki.
2015-08-23 15:20:08 +05:30
Sunil Mohan Adapa
5ffe3dab70 Reorder all app menu items alphabetically
- Alphabetical order is best for users to find the necessary items
  quickly and precitably.

- Currently there is no particular order.
2015-07-28 12:15:35 +05:30
fonfon
824a9091c1 use django-stronghold for authentication handling (instead of @login_required) 2015-07-01 00:01:02 +05:30
Bob Girard
d64ce6cc01 Bundle tests with applications
- For each application, add ./tests directory and __init__.py file
  within it.

- Modify test controllers (coverage.py, runtests.py) to find the new
  test directories for testing and coverage analysis.

- Move existing application-specific test modules (test_pagekite.py) to
  the newly created directories.
2015-06-26 12:05:48 +05:30
Sunil Mohan Adapa
b62f6746f4 Handle arguments to actions properly
- Don't allow strings to be sent as arguments.  The mixup with
  lists/tuples could be dangerous.

- Don't escape arguments.  subprocess.Popen takes care that arguments
  are passed on nicely to the actions.

- Update tests.
2015-05-01 18:52:17 +05:30
James Valleroy
d4ac0c3b46 Update dynamicdns views to use new required package list format. 2015-04-04 13:14:57 -04:00
Daniel Steglich
8af4ee423a removed dictionary because string values can be used in dropdown menu directly 2015-03-13 14:09:58 +01:00
Daniel Steglich
337fa56b15 refactoring, made the code more readable, use consistent indentions, whitespaces and linebreaks next to brackets 2015-03-12 17:07:21 +01:00
Daniel Steglich
e94c85c357 improved help texts 2015-03-10 09:00:56 +01:00
Daniel Steglich
66a4083891 moved reconfiguration of dropdown display directly to the onchange function of the dropdown box as the code is not used elsewhere 2015-03-10 00:31:30 +01:00
Daniel Steglich
dfe35c9c97 improved helper text 2015-03-09 23:39:35 +01:00
Daniel Steglich
8269cfe97e removed duplicate code and avoid deleting form field config on reload 2015-03-09 23:33:09 +01:00
Daniel Steglich
2782406cae improved form validation (only request domain/user/pass if gnudip is selected to allow empty params on update URL), and stripped single qoutes from empty values to avoid showing them when form is loaded 2015-03-09 23:32:13 +01:00
Daniel Steglich
1a3d7a3d00 only validate form fileds if the form is enabled at all 2015-03-09 22:36:21 +01:00
Daniel Steglich
9f8281f9dc do not change values of dropdown element, but change selection 2015-03-09 22:35:51 +01:00
Daniel Steglich
6bb73467a6 improved helptext 2015-03-09 22:06:21 +01:00
Daniel Steglich
9f6d9487bd use ssl for freedns 2015-03-09 21:57:34 +01:00
Daniel Steglich
4356a2cff3 fixed typo 2015-03-09 21:53:12 +01:00
Daniel Steglich
fa076edda4 fixed indention 2015-03-09 21:44:25 +01:00
Daniel Steglich
15a6c49922 only show fields according to dropdown menu when entering form first tim (after enable checkbox was selected) 2015-03-07 00:03:00 +01:00
Daniel Steglich
e5ddfe0906 added hint for free dns service 2015-03-06 23:41:30 +01:00
Daniel Steglich
808062da11 added some comments 2015-03-06 23:30:24 +01:00
Daniel Steglich
ce057ebd22 need to remove unused parameters according to dropdown box selection 2015-03-06 23:27:45 +01:00
Daniel Steglich
21c4326a1d do not clear server and URL values when changing dropdown menu but check if one of them is filled when validate the form 2015-03-06 23:18:50 +01:00
Daniel Steglich
3b0a070283 configure the form according to last configured values when loading the formular 2015-03-06 23:10:36 +01:00
Daniel Steglich
379815d92b fixed dropdown box based deletion of unused params 2015-03-06 23:06:17 +01:00