.authorized
Check for authorization.
Synopsis
.authorized [job=<job>] [client=<client>] [storage=<storage>]
[schedule=<schedule>] [pool=<pool>] [cmd=<cmd>]
[fileset=<fileset>] [catalog=<catalog>]
Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.
Description
Checks whether the own console may access a resource or command and answers authorized or not authorized. The check uses the ACLs of the Console resource and its profiles (Job, Client, Storage, Schedule, Pool, Command, FileSet and Catalog ACL). User interfaces such as bareos-webui use it to show buttons only when permitted. It only reads.
Keys are case-insensitive, and only the ACL is checked, not whether the resource exists. With several arguments the last known one decides. Without arguments, with unknown keys only or with a key lacking a value the answer is not authorized, even for an unrestricted console.
Arguments
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
job= | resource | from .jobs | Job name. | ||
client= | resource | from .clients | Client name. | ||
storage= | resource | from .storages | Storage name. | ||
schedule= | resource | from .schedule | Schedule name. | ||
pool= | resource | from .pools | Pool name. | ||
cmd= | resource | command names | Command name. | ||
fileset= | resource | from .filesets | FileSet name. | ||
catalog= | resource | from .catalogs | Catalog name. |
Examples
Check whether the console may run purge:
.authorized cmd=purge
Check access to client bareos-fd:
.authorized client=bareos-fd