//
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
//
===== User command
This command works with <<users-groups-and-any-objects,users>>.

[discrete]
====== Help message
[source,bash]
----
Usage: user [options]
  Options:
    --help 
    --list 
    --details 
    --get-user-key
       Syntax: --get-user-key {USERNAME} {USERNAME} [...]
    --get-username
       Syntax: --get-username {USER-KEY} {USER-KEY} [...]
    --read-by-username
       Syntax: --read-by-username {USERNAME} {USERNAME} [...]
    --read-by-userkey
       Syntax: --read-by-userkey {USER-KEY} {USER-KEY} [...]
    --search-by-attribute
       Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}
    --search-by-role
       Syntax: --search-by-role {REALM} {ROLE-KEY}
    --search-by-resource
       Syntax: --search-by-resource {REALM} {RESOURCE-KEY}
    --delete
       Syntax: --delete {USER-KEY} {USER-KEY} [...]
    --delete-all 
       Syntax: --delete-all {REALM}
    --delete-by-attribute
       Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}
----

[discrete]
====== Options

--details::
This option shows a table with some details about the Users.
--list::
Running the command with this option you will see the list of all Users in the environment. However, the system will 
ask you a confirmation before execution, because as you can imagine this operation might produce a very large output.
--get-user-key::
The option to get the user key starting from a username.
--get-username::
The option to get the username starting from a user key.
--read-by-userkey::
The option to read user information by their user key.
--read-by-username::
The option to read user information by their username.
--search-by-attribute::
The option to search a list of Users with a common attribute.
--search-by-role::
The option to search a list of Users with a specified role.
--search-by-resource::
The option to search a list of Users with a specified resource.
--delete::
The option to delete a specified user.
--delete-by-attribute::
The option to delete the Users with a common attribute.
--delete-all::
The option to delete all Users of the realm passed as input.
