summaryrefslogtreecommitdiffstats
path: root/scripts/role-add-privilege.sh
blob: d9ac49dbb3dc8974863ea6328914d53f027ef1f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh +x

. ./include.sh

json="{
    \"method\": \"role_add_privilege\",
    \"params\": [
        [ \"Test Role\" ],
        {
            \"privilege\": \"Write, Add and Delete Members\"
        }
    ]
}"

curl\
  -H "Content-Type: application/json"\
  -H "Accept: applicaton/json"\
  --negotiate -u :\
  --cacert /etc/ipa/ca.crt\
  -d "$json"\
  -X POST\
  $IPA_JSON_URL