此内容没有您所选择的语言版本。
Chapter 37. filter
Manage permission filters
Usage
# hammer filter [OPTIONS] SUBCOMMAND [ARG] ...
Options
-
-h,--help– Print help
37.1. filter available-permissions 复制链接链接已复制到粘贴板!
List all permissions
Usage
# hammer filter available-permissions [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,allto 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 |
| Resource | x | x |
Search and order fields
-
id– integer -
name– string -
resource_type– string
37.2. filter available-resources 复制链接链接已复制到粘贴板!
List available resource types
Usage
# hammer filter available-resources [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 -
--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 |
|---|---|---|---|
| Name | x | x | x |
37.3. filter create 复制链接链接已复制到粘贴板!
Create a filter
Usage
# hammer filter create [OPTIONS]
Options
-
--location VALUE– Set the current location context for the request -
--location-id NUMBER– Set the current location context for the request -
--location-ids LIST -
--location-title VALUE– Set the current location context for the request -
--location-titles LIST -
--locations LIST -
--organization VALUE– Set the current organization context for the request -
--organization-id NUMBER– Set the current organization context for the request -
--organization-ids LIST -
--organization-title VALUE– Set the current organization context for the request -
--organization-titles LIST -
--organizations LIST -
--override BOOLEAN -
--permission-ids LIST -
--permissions LIST -
--role VALUE– User role name -
--role-id VALUE -
--search VALUE -
-h,--help– Print help
Overriding organizations and locations: Filters inherit organizations and locations from its role by default. This behavior can be changed by setting --override=true. Therefore options --organization[s|-ids] and --location[s|-ids] are applicable only when the override flag is set.
37.4. filter delete 复制链接链接已复制到粘贴板!
Delete a filter
Usage
# hammer filter <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 -
--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
37.5. filter info 复制链接链接已复制到粘贴板!
Show a filter
Usage
# hammer filter <info|show> [OPTIONS]
Options
-
--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 -
--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 |
| Resource type | x | x | |
| Search | x | x | |
| Unlimited? | x | x | |
| Override? | x | x | |
| Role | x | x | |
| Permissions | x | x | |
| Locations/ | x | x | |
| Organizations/ | x | x | |
| Created at | x | x | |
| Updated at | x | x |
37.6. filter list 复制链接链接已复制到粘贴板!
List all filters
Usage
# hammer filter <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,allto return all results -
--search VALUE– Filter 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 |
Search and order fields
-
id– integer -
limited– Values: true, false -
location– string -
location_id– integer -
organization– string -
organization_id– integer -
override– Values: true, false -
permission– string -
resource– string -
role– string -
role_id– integer -
search– text -
unlimited– Values: true, false
37.7. filter update 复制链接链接已复制到粘贴板!
Update a filter
Usage
# hammer filter update [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-ids LIST -
--location-title VALUE– Set the current location context for the request -
--location-titles LIST -
--locations LIST -
--organization VALUE– Set the current organization context for the request -
--organization-id NUMBER– Set the current organization context for the request -
--organization-ids LIST -
--organization-title VALUE– Set the current organization context for the request -
--organization-titles LIST -
--organizations LIST -
--override BOOLEAN -
--permission-ids LIST -
--permissions LIST -
--role VALUE– User role name -
--role-id VALUE -
--search VALUE -
-h,--help– Print help
Overriding organizations and locations: Filters inherit organizations and locations from its role by default. This behavior can be changed by setting --override=true. Therefore options --organization[s|-ids] and --location[s|-ids] are applicable only when the override flag is set.