malcontent-client: Rename ‘check’ command to ‘check-app-filter’
Since it operates only on the app filter. This updates the documentation too. No compatibility fallback is provided. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
b3dbc07b92
commit
983e3bfa39
|
@ -12,7 +12,7 @@ malcontent\-client — Parental Controls Access Utility
|
||||||
.\"
|
.\"
|
||||||
\fBmalcontent\-client get\-app\-filter [\-q] [\-n] [\fPUSER\fB]
|
\fBmalcontent\-client get\-app\-filter [\-q] [\-n] [\fPUSER\fB]
|
||||||
.PP
|
.PP
|
||||||
\fBmalcontent\-client check [\-q] [\-n] [\fPUSER\fB] \fPARG\fB
|
\fBmalcontent\-client check\-app\-filter [\-q] [\-n] [\fPUSER\fB] \fPARG\fB
|
||||||
.\"
|
.\"
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.IX Header "DESCRIPTION"
|
.IX Header "DESCRIPTION"
|
||||||
|
@ -25,7 +25,7 @@ controls.
|
||||||
It communicates with accounts-service, which stores parental controls data.
|
It communicates with accounts-service, which stores parental controls data.
|
||||||
.PP
|
.PP
|
||||||
Its first argument is a command to run. Currently, the only supported commands
|
Its first argument is a command to run. Currently, the only supported commands
|
||||||
are \fBget\-app\-filter\fP and \fBcheck\fP.
|
are \fBget\-app\-filter\fP and \fBcheck\-app\-filter\fP.
|
||||||
.\"
|
.\"
|
||||||
.SH \fBget\-app\-filter\fP OPTIONS
|
.SH \fBget\-app\-filter\fP OPTIONS
|
||||||
.IX Header "get\-app\-filter OPTIONS"
|
.IX Header "get\-app\-filter OPTIONS"
|
||||||
|
@ -43,8 +43,8 @@ Do not allow interactive authorization with polkit. If this is needed to
|
||||||
complete the operation, the operation will fail. (Default: Allow interactive
|
complete the operation, the operation will fail. (Default: Allow interactive
|
||||||
authorization.)
|
authorization.)
|
||||||
.\"
|
.\"
|
||||||
.SH \fBcheck\fP OPTIONS
|
.SH \fBcheck\-app\-filter\fP OPTIONS
|
||||||
.IX Header "check OPTIONS"
|
.IX Header "check\-app\-filter OPTIONS"
|
||||||
.\"
|
.\"
|
||||||
.IP "\fBUSER\fP"
|
.IP "\fBUSER\fP"
|
||||||
Username or ID of the user to get the app filter for. If not specified, the
|
Username or ID of the user to get the app filter for. If not specified, the
|
||||||
|
@ -85,8 +85,8 @@ encounters problems.
|
||||||
.IP "0" 4
|
.IP "0" 4
|
||||||
.IX Item "0"
|
.IX Item "0"
|
||||||
No problems occurred. The utility ran and successfully queried the app filter.
|
No problems occurred. The utility ran and successfully queried the app filter.
|
||||||
If running the \fBcheck\fP command, the given path, content type or flatpak ref
|
If running the \fBcheck\-app\-filter\fP command, the given path, content type or
|
||||||
was allowed for the given user.
|
flatpak ref was allowed for the given user.
|
||||||
.\"
|
.\"
|
||||||
.IP "1" 4
|
.IP "1" 4
|
||||||
.IX Item "1"
|
.IX Item "1"
|
||||||
|
@ -99,8 +99,8 @@ The current user was not authorized to query the app filter for the given user.
|
||||||
.\"
|
.\"
|
||||||
.IP "3" 4
|
.IP "3" 4
|
||||||
.IX Item "3"
|
.IX Item "3"
|
||||||
If running the \fBcheck\fP command, the given path, content type or flatpak ref
|
If running the \fBcheck\-app\-filter\fP command, the given path, content type or
|
||||||
was \fInot\fP allowed for the given user.
|
flatpak ref was \fInot\fP allowed for the given user.
|
||||||
.\"
|
.\"
|
||||||
.SH BUGS
|
.SH BUGS
|
||||||
.IX Header "BUGS"
|
.IX Header "BUGS"
|
||||||
|
|
|
@ -213,7 +213,7 @@ def is_valid_content_type(arg):
|
||||||
parts[0] != '' and parts[1] != '')
|
parts[0] != '' and parts[1] != '')
|
||||||
|
|
||||||
|
|
||||||
def command_check(user, arg, quiet=False, interactive=True):
|
def command_check_app_filter(user, arg, quiet=False, interactive=True):
|
||||||
"""Check the given path, content type or flatpak ref is runnable by the
|
"""Check the given path, content type or flatpak ref is runnable by the
|
||||||
given user, according to their app filter."""
|
given user, according to their app filter."""
|
||||||
user_id = __lookup_user_id_or_error(user)
|
user_id = __lookup_user_id_or_error(user)
|
||||||
|
@ -375,18 +375,19 @@ def main():
|
||||||
help='user ID or username to monitor the app '
|
help='user ID or username to monitor the app '
|
||||||
'filter for (default: all users)')
|
'filter for (default: all users)')
|
||||||
|
|
||||||
# ‘check’ command
|
# ‘check-app-filter’ command
|
||||||
parser_check = subparsers.add_parser('check', parents=[common_parser],
|
parser_check_app_filter = \
|
||||||
help='check whether a path, content '
|
subparsers.add_parser('check-app-filter', parents=[common_parser],
|
||||||
'type or flatpak ref is '
|
help='check whether a path, content type or '
|
||||||
'allowed by app filter')
|
'flatpak ref is allowed by app filter')
|
||||||
parser_check.set_defaults(function=command_check)
|
parser_check_app_filter.set_defaults(function=command_check_app_filter)
|
||||||
parser_check.add_argument('user', default='', nargs='?',
|
parser_check_app_filter.add_argument('user', default='', nargs='?',
|
||||||
help='user ID or username to get the app filter '
|
help='user ID or username to get the '
|
||||||
'for (default: current user)')
|
'app filter for (default: '
|
||||||
parser_check.add_argument('arg',
|
'current user)')
|
||||||
help='path to a program, content type or '
|
parser_check_app_filter.add_argument('arg',
|
||||||
'flatpak ref to check')
|
help='path to a program, content '
|
||||||
|
'type or flatpak ref to check')
|
||||||
|
|
||||||
# ‘oars-section’ command
|
# ‘oars-section’ command
|
||||||
parser_oars_section = subparsers.add_parser('oars-section',
|
parser_oars_section = subparsers.add_parser('oars-section',
|
||||||
|
|
Loading…
Reference in New Issue