- During the rendering of the view, the state of installation may keep changing.
This may lead to inconsistencies in the page. Avoid that by collecting the
state once and then reusing that throughout the rendering process.
- During the time that setup middleware's checked of setup state of an app and
rendering of app's setup view, if the setup process could get completed. This
will lead to setup page being shown even after the application is installed.
Handle this case and show a proper page instead of 'Submit Query' button on
the page. Fixes#1360. This can be easily replicated by introducing a 10
second sleep after setup middle checks of the application is 'up-to-date'.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Redirect the POST request for install with the template. This ensures that any
reload performed on the page will be a GET request.
https://en.wikipedia.org/wiki/Post/Redirect/Get
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- This is a fallback solution to manually refresh package lists on AWS images
since they come with no apt package lists.
- This can also be occasionally useful for people running the testing
distribution where packages might be frequently added and removed.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Add a field `allowed_groups` to shortcuts, which will contain groups which can
access a particular app
- When a user is logged in, only return those shortcuts to the front page if the
user is allowed to access them. This check is done based on the allowed_groups
field of the shortcut
- Add allowed_groups for shortcuts of all apps with group-restricted access
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Closes#930
- Make targets to download wiki pages of each service
- Add post-processor script for DocBook file processing
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
Separate language cookie are only used if sessions (session middleware) are not
available. Otherwise, even anonymous users have their language preference in
sessions instead of cookies. This is default Django behavior, conform to it.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- Use properly base class overrides
- Implement feature to go back to the page user was on before language
selection.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- UserProfile model is created, it has one-to-one relationship with User.
- Language selection dropdown added to UserCreate and UserUpdate forms.
- Adds None to language selection dropdown to explicitly unselect.
- LANGUAGE_SESSION_KEY is set to User's preferred language on LogIn activity.
- LANGUAGE_SESSION_KEY is deleted on User's LogOut activity.
Signed-off-by: Sai Kiran Naragam <saikiran.rguiiit@gmail.com>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
- Add yapf style file for consistency of formatting
- Some minor changes and renaming
- Add template tag filters for checking conditions
- Move icons from img directory to icons directory
Currently the client listing is in both the SetupView and ServceView for ease of
development. Have to remove from ServiceView.
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
It is believed that ownCloud is unlikely to return to Debian in near future.
Removing module to ease maintenance.
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Show a warning message that a package manager is running. This prevents users
from getting an installation error just because another installation/upgrade is
running.
Closes: #625.
- 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
- 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.
- After the shortcuts were turned into a list instead of dictionary, the
descriptions stopped showing in the front page due to an 'in' check
that worked for dict. Fix this by changing the shortcuts into a
dictionary.
- Also make the key of the shortcut dict an 'id' instead of 'app' that
could create confusion how an app maps to a shortcut.
- Minor indentation fixes.
- 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)
- A lot of boiler plate code can be removed from Plinth if enabling and
disabling an application can be done using a common base form.
- This also allows to define a reusable method in an application for
enabling and disabling.
- This brings more structure to a application module and paves way for
having a different views such as dashboard.
- Plinth will become the home page for FreedomBox. So it has to serve
the purpose the directing users to available services. This will
happen most often and should also work when users are not logged in.
- Soon we will have a resigned 'front page'/'apps' section which is
expected to be shown to user who are not logged in too.
- Apps menus has been removed. Index page is now the only way to reach
Apps section.
- Refresh package list before trying to install packages. Also lookup
the ID of the package, including the version, using the newly fetched
package list.
- Call on_install() callback requested by modules only if the package
installation was successful. Handle any exception raised in the
callback itself.
- Handle exceptions raised during packagekit operations. Also check the
returned results for error code.
- Capture error/success status during a transaction. Don't destroy the
transaction object until the error/success status has been collected.
When a view is refreshed after completion of a transaction collect the
result of the transaction and show it to the user.
- Handle cases where package searches in the package list fails. Simply
show the package name without its description.
- Uses PackageKit dameon, Glib library wrapping packagekit DBUS API and
Python bindings for the Glib library.
- Implement a decorator to wrap views requiring packages.
- Framework allows for parallel operations. However, doing parallel
operations hangs because of what appears to be PackageKit backend
limitations.