Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
polkit
polkit
Commits
dd2c0163
Commit
dd2c0163
authored
Dec 05, 2007
by
David Zeuthen
Browse files
update completion + man page since polkit-auth(1) takes >1 --constraint args
parent
b1dd4f0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/man/polkit-auth.xml
View file @
dd2c0163
...
...
@@ -23,8 +23,8 @@
<arg><option>
--show-obtainable
</option></arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--explicit
</option></arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--explicit-detail
</option></arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--grant
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg></arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--block
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg></arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--grant
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg>
*
</arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--block
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg>
*
</arg>
<arg><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--revoke
<replaceable>
action
</replaceable></option></arg>
<arg><option>
--version
</option></arg>
<arg><option>
--help
</option></arg>
...
...
@@ -102,34 +102,34 @@
</varlistentry>
<varlistentry>
<term><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--grant
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg></term>
<term><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--grant
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg>
*
</term>
<listitem>
<para>
Grant an authorization for an action. This is different
than
<literal>
--obtain
</literal>
insofar that
the
<literal>
defaults
</literal>
stanza of the .policy file
is not consulted. Optionally,
a
constraint on
the granted
authorization can be specified; allowed values
is not consulted. Optionally,
one or more
constraint
s
on
the granted
authorization can be specified; allowed values
are:
<literal>
local
</literal>
,
<literal>
active
</literal>
,
<literal>
local+active
</literal>
.
The authorization needed to
grant authorizations is
<literal>
active
</literal>
. The authorization needed to
grant authorizations is
<literal>
org.freedesktop.policykit.grant
</literal>
.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--block
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg></term>
<term><option><arg><option>
--user
<replaceable>
user
</replaceable></option></arg>
--block
<replaceable>
action
</replaceable></option><arg><option>
--constraint
<replaceable>
constraint
</replaceable></option></arg>
*
</term>
<listitem>
<para>
Grant an negative authorization for an action. Negative
authorizations are normally used to block users that would
normally be authorized due to implicit
authorizations. Optionally,
a
constraint on the
granted
negative authorization can be specified; allowed
values
are:
<literal>
local
</literal>
,
<literal>
active
</literal>
,
<literal>
local+active
</literal>
.
The authorization needed to
grant negative authorizations is
authorizations. Optionally,
one or more
constraint
s
on the
granted
negative authorization can be specified; allowed
values
are:
<literal>
local
</literal>
,
<literal>
active
</literal>
. The authorization needed to
grant negative authorizations is
<literal>
org.freedesktop.policykit.grant
</literal>
if the
"beneficiary" is another user.
</para>
...
...
tools/polkit-bash-completion.sh
View file @
dd2c0163
...
...
@@ -58,7 +58,7 @@ __polkit_auth() {
COMPREPLY
=(
$(
compgen
-W
"
$(
polkit-action
)
"
--
$cur
)
)
;;
--constraint
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"
none:
local:active
:local+active
"
--
$cur
)
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"local:active"
--
$cur
)
)
;;
esac
;;
...
...
@@ -68,11 +68,19 @@ __polkit_auth() {
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"--constraint"
--
$cur
)
)
;;
esac
case
"
${
COMP_WORDS
[1]
}
"
in
--grant
|
--block
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"--constraint"
--
$cur
)
)
;;
esac
;;
6
)
case
"
${
COMP_WORDS
[
5
]
}
"
in
*
)
case
"
${
COMP_WORDS
[
$((
$COMP_CWORD
-
1
))
]
}
"
in
--constraint
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"none:local:active:local+active"
--
$cur
)
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"local:active"
--
$cur
)
)
;;
*
)
COMPREPLY
=(
$(
IFS
=
:
compgen
-S
' '
-W
"--constraint"
--
$cur
)
)
;;
esac
;;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment