b5933: Add landscape manager definition+ constants

This commit is contained in:
Thomas Stokes committed 2024-01-03 04:50:27 +00:00
1 parent ab813d17b3
commit 5b02922b9b
1 file changed
+4 -1
@@ -1,8 +1,11 @@
#!/bin/bash
#Purpose: Create a mailing list in home_dir/mailinglists that contains the emails of all landscape managers.
# Purpose: Create a mailing list in home_dir/mailinglists/landscapeManagersMailingList that contains the emails of all landscape managers, ie. those who
# have complete admin privileges in the aws environment.
BEARER_TOKEN="$1"
HOME_DIR="$2"
FOLDER_WITHIN_HOME="mailinglists"
NAME_TO_STORE_IN="landscapeManagersMailingList"
BASE_URL="https://security-service.sapsailing.com"
curl_output=$( curl -H 'X-SAPSSE-Forward-Request-To: master' -H 'Authorization: Bearer '${BEARER_TOKEN} "${BASE_URL}/security/api/restsecurity/users_with_permission?permission=LANDSCAPE:MANAGE:AWS" 2>/dev/null )
curl_output=$(echo $curl_output | sed "s/^\[//" | sed "s/\]$//" | sed 's|"||g' )