2.66. Hammer 角色

管理用户角色

Usage:
    hammer role [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
 SUBCOMMAND                    Subcommand
 [ARG] ...                     Subcommand arguments

Subcommands:
 clone                         Clone a role
 create                        Create a role
 delete, destroy               Delete a role
 filters                       List all filters
 info, show                    Show a role
 list, index                   List all roles
 update                        Update a role

Options:
 -h, --help                    Print help

2.66.1. Hammer 角色克隆

克隆角色

Usage:
    hammer role clone [OPTIONS]

Options:
 --description VALUE           Role description
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-ids LIST           REPLACE locations with given ids
 --location-title VALUE        Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --name VALUE
 --new-name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-ids LIST       REPLACE organizations with given ids.
 --organization-title VALUE    Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

2.66.2. Hammer 角色创建

创建角色

Usage:
    hammer role create [OPTIONS]

Options:
 --description VALUE           Role description
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-ids LIST           REPLACE locations with given ids
 --location-title VALUE        Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-ids LIST       REPLACE organizations with given ids.
 --organization-title VALUE    Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

2.66.3. Hammer 角色删除

删除角色

Usage:
    hammer role <delete|destroy> [OPTIONS]

Options:
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  User role name
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

2.66.4. Hammer 角色过滤器

列出所有过滤器

Usage:
    hammer role filters [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE                    User role id
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  User role name
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --page NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 -h, --help                    Print help

Predefined field sets:
  --------------|-----|---------|-----
  FIELDS        | ALL | DEFAULT | THIN
  --------------|-----|---------|-----
  Id            | x   | x       | x
  Resource type | x   | x       |
  Search        | x   | x       |
  Unlimited?    | x   | x       |
  Override?     | x   | x       |
  Role          | x   | x       |
  Permissions   | x   | x       |
  --------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

2.66.5. Hammer 角色信息

显示角色

Usage:
    hammer role <info|show> [OPTIONS]

Options:
 --description VALUE
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --name VALUE                  User role name
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 -h, --help                    Print help

Predefined field sets:
  ---------------|-----|---------|-----
  FIELDS         | ALL | DEFAULT | THIN
  ---------------|-----|---------|-----
  Id             | x   | x       | x
  Name           | x   | x       | x
  Builtin        | x   | x       |
  Description    | x   | x       |
  Locations/     | x   | x       |
  Organizations/ | x   | x       |
  ---------------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

2.66.6. Hammer 角色列表

列出所有角色

Usage:
    hammer role <list|index> [OPTIONS]

Options:
 --fields LIST                 Show specified fields or predefined field sets only. (See below)
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-title VALUE        Set the current location context for the request
 --order VALUE                 Sort and order by a searchable field, e.g. '<field> DESC'
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-title VALUE    Set the current organization context for the request
 --page NUMBER                 Page number, starting at 1
 --per-page VALUE              Number of results per page to return, 'all' to return all results
 --search VALUE                Filter results
 -h, --help                    Print help

Predefined field sets:
  --------|-----|---------|-----
  FIELDS  | ALL | DEFAULT | THIN
  --------|-----|---------|-----
  Id      | x   | x       | x
  Name    | x   | x       | x
  Builtin | x   | x       |
  --------|-----|---------|-----

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string

Search / Order fields:
  builtin             Values: true, false
  description         text
  name                string
  permission          string

2.66.7. Hammer 角色更新

更新角色

Usage:
    hammer role update [OPTIONS]

Options:
 --description VALUE           Role description
 --id VALUE
 --location VALUE              Set the current location context for the request
 --location-id NUMBER          Set the current location context for the request
 --location-ids LIST           REPLACE locations with given ids
 --location-title VALUE        Set the current location context for the request
 --location-titles LIST
 --locations LIST
 --name VALUE
 --new-name VALUE
 --organization VALUE          Set the current organization context for the request
 --organization-id NUMBER      Set the current organization context for the request
 --organization-ids LIST       REPLACE organizations with given ids.
 --organization-title VALUE    Set the current organization context for the request
 --organization-titles LIST
 --organizations LIST
 -h, --help                    Print help

Option details:
  Here you can find option types and the value an option can accept:

  BOOLEAN             One of true/false, yes/no, 1/0
  DATETIME            Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format
  ENUM                Possible values are described in the option's description
  FILE                Path to a file
  KEY_VALUE_LIST      Comma-separated list of key=value.
                      JSON is acceptable and preferred way for such parameters
  LIST                Comma separated list of values. Values containing comma should be quoted or escaped with backslash.
                      JSON is acceptable and preferred way for such parameters
  MULTIENUM           Any combination of possible values described in the option's description
  NUMBER              Numeric value. Integer
  SCHEMA              Comma separated list of values defined by a schema.
                      JSON is acceptable and preferred way for such parameters
  VALUE               Value described in the option's description. Mostly simple string