Commit Graph

12 Commits

Author SHA1 Message Date
Philip Withnall 222b436a61 accounts-service: Add allow-user-installation setting
This controls whether the user can install to their user repository at
all; if it’s true (the default), then installation of apps is still
subject to the OARS filter.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24457
2018-11-29 21:16:36 +00:00
Philip Withnall 3ec77740c7 accounts-service: Rename allow-app-installation to be system-specific
This is in preparation for adding a second boolean for the flatpak user
repository. Make the existing allow-app-installation boolean control
permissions for the flatpak system repository.

Having one boolean for each repository means we can allow users to
install to their user repository by default (subject to OARS ratings),
but not be allowed to install to the system repository.

While changing the name and semantics of the boolean, flip its default
value from True to False. Rather than letting any non-admin user install
new apps by default (subject to OARS restrictions), re-limit it to admin
users and users whose allow-system-installation key has been explicitly
set to True by the admin.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24457
2018-11-29 21:13:28 +00:00
Philip Withnall 244985f45f libeos-parental-controls: Support matching against flatpak app IDs
These are the app-specific part of a flatpak ref, and are what’s
available when you have a .desktop file, via the X-Flatpak key in the
.desktop file. For example, for a flatpak ref
‘app/org.gnome.Builder/x86_64/master’, the app ID is
‘org.gnome.Builder’. It makes sense that we’d want to match against app
IDs in some situations, since the user probably doesn’t care about the
architecture or branch of the app they want to proscribe.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24016
2018-11-14 15:17:18 +00:00
Philip Withnall 9a890750c4 eos-parental-controls-client: Print app filter on ‘get’
Previously we just printed whether the filter was successfully
retrieved, since there weren’t any non-parameterised getter functions on
EpcAppFilter. Now we have some of them, we can print details of the app
filter.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24457
2018-11-13 11:46:24 +00:00
Philip Withnall 94beacb4e3 eos-parental-controls-client: Support setting allow-app-installation key
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24457
2018-11-13 11:45:41 +00:00
Philip Withnall 72812d2709 eos-parental-controls-client: Use synchronous methods
This should not introduce any functional changes, but does simplify the
code.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24024
2018-10-31 11:04:40 +00:00
Philip Withnall c19b6a777f libeos-parental-controls: Add support for flatpak refs
As well as handling paths on the file system, we should allow flatpak
refs to be explicitly handled in the app filter.

Both refs and paths can be stored safely in the same app filter GStrv
because paths are always absolute and refs always start with ‘app/’ or
‘runtime/’.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24020
2018-10-25 15:16:31 +13:00
Philip Withnall f68e3fa527 eos-parental-controls-client: Add a ‘set’ command
This allows the app filter to be set, using the new library API for it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24025
2018-10-25 15:12:32 +13:00
Georges Basile Stavracas Neto 55d213cfbc
Revert "T24025 Add setter support to the library" 2018-10-17 10:38:37 -03:00
Philip Withnall 02dfdac221 eos-parental-controls-client: Add a ‘set’ command
This allows the app filter to be set, using the new library API for it.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T24025
2018-10-12 16:48:29 +13:00
Philip Withnall 8b2115a801 eos-parental-controls-client: Add OARS filter support
This basic support will return the value of a given OARS section to the
caller.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://phabricator.endlessm.com/T23999
2018-10-09 23:37:36 +13:00
Philip Withnall 63d229e653 eos-parental-controls-client: Add simple client program
This allows querying of the parental controls for a given user (or the
current user).

Includes documentation but no tests yet.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://phabricator.endlessm.com/T23859
2018-10-03 14:53:14 +01:00