27 Commits

Author SHA1 Message Date
Alice Kile
8e3bbdb089
clients: implement launch button feature
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-18 19:41:14 +05:30
Sunil Mohan Adapa
b684b07d11
names: Make all apps use new api to retrieve domain names
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-08-11 18:39:54 -04:00
Nikolas Nyby
d2e987ef3c
Fix a handful of typos in docs and comments
Found with [codespell](https://github.com/codespell-project/codespell/)

Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-07-24 12:39:11 -07:00
Sunil Mohan Adapa
0f807bcd48
sso: Use new features of axes, log axes messages
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-07-21 09:05:58 -04:00
Joseph Nuthalapati
d451b54286
backups: Add test for adding ssh remotes
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2019-07-03 12:42:02 +05:30
Sunil Mohan Adapa
ebca76b236
utils: Introduce abstraction over distutils comparison of versions
In future, if the semantics need to better align with Debian's version
comparison, we can implement that easily.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-03-01 23:50:37 -05:00
Sunil Mohan Adapa
d3bdaf0729
utils: Handle exceptions in context management for YAMLFile
When an exception is raised within the context, the YAML file should not
written.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-02-18 21:51:20 -05:00
Joseph Nuthalapati
753881b80f
utils: Simplify YAMLFile by removing the post_exit argument
Whatever function is passed in post_exit can simply be called by the caller
itself as the next statement.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2019-02-14 16:39:05 -08:00
Joseph Nuthalapati
3a579e2d72
openvpn: is-setup checks for non-empty dh.pem file
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-11-19 07:46:31 -05:00
Sunil Mohan Adapa
89f31db71f
utils: Remove unused method
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-07-29 15:57:16 -04:00
Joseph Nuthalapati
8451c0b2dc
apps: Fix app names and short descriptions not being translated
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-04-08 10:57:19 -04:00
Sunil Mohan Adapa
0e9d10bff5
searx: Set file permissions while creating file
To avoid race conditions.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:56:53 +05:30
Joseph Nuthalapati
67274e1566
searx: Changes from code review
- Use 32-bit key for HMAC-256
- Use secrets library instead of os.urandom
- uwsgi enable/disable along with webserver enable/disable
- Text changes

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:59 +05:30
Joseph Nuthalapati
823c2968f0
searx: New app for Searx metasearch engine
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2018-02-26 18:53:46 +05:30
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 Nuthalpati
37138ee83b
mediawiki: Add wiki application
Installs and configures MediaWiki. SSO integration is not included yet.

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2018-01-01 13:20:37 -05:00
Joseph Nuthalapati
202d0bf5c7
snapshots: Minor refactoring
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
2017-12-18 12:23:58 +05:30
Sunil Mohan Adapa
acd248e506
clients: Cleanup framework
- Move all utilities to a separate clients.py module. Tests too.

- Use fewer custom template tags. Actually only one tag is really required.
  Keeping custom tags minimal is a goal.

- Merge the methods to generate app store URLs.

- Implement a validator for validating client information and use that instead
  of enums.

- Internationalize the text on template page.

- Add missing RPM package case.

- Cleanup CSS. Remove unused styles, minimize the styles set.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-13 18:56:30 -05:00
Joseph Nuthalapati
4c69935e7a
Remove unnecessary attributes in manifest files
- Other minor refactoring
- Fix ejabberd and jsxc Client Apps listing

Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-12-04 12:15:54 -05:00
Joseph Nuthalpati
f330d09ec9
sso: Add captcha validation on 3 failed attempts
- clearing ip address correctly is not implemented yet
- currently clearing all ip addresses

Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2017-10-17 22:07:57 -04:00
Joseph Nuthalpati
5ad180fcc9
Add Tahoe-LAFS module
- Created basic plinth app which starts an introducer and a storage
  node on the FreedomBox.
- Prompt user to set a domain name before creating Tahoe-LAFS nodes.
- Support adding and removing of introducers to the storage node.
- Serve Tahoe-LAFS from a different port.
- Start all nodes and introducers at system startup.
- Add utility class YAMLFile with test cases.
2017-06-10 09:38:57 -04:00
Soumya97
6a53dd015e
context_processor: Cache whether user is admin (Closes: #781) 2017-04-18 16:01:48 +05:30
Rahul De
ad0b235dd7
users: Restrict groups and active user control to admins
- Only admins can now edit the groups of any user

- Only admins can mark any user as active or not

- Refactored all occurrences of admin checks to its own utility function
2017-02-15 21:07:54 +05:30
Sunil Mohan Adapa
dd5ab7612e
Minor refactoring and lint fixes
- Rename AdminMiddleware to AdminRequiredMiddleware to be consistent
  with stronghold/Django terminology

- Simplify .gitignore pattern

- Format single line docstrings as per PEP8.

- Add missing docstrings.

- Restrict lines to 79 characters.
2017-02-15 21:07:27 +05:30
lispyclouds
3b23f78bdc
Implement middleware for admin views
- Add AdminMiddleware to deny non admin users
- Add decorator to mark views as "non admin"
2017-02-15 20:57:52 +05:30
Sunil Mohan Adapa
8ccffcf02c
Add utility method to lazy format lazy string
This method is useful to format strings that are lazy (such as those in
Forms).
2016-01-24 00:22:59 +05:30
Sunil Mohan Adapa
cc858bbd6a Use pgi only when gi is not available
- Write a convenience utility to handle the import process.
2015-11-16 09:55:20 +05:30