diff --git a/scripts/addGroupToDrupalAdmins.sh b/scripts/addGroupToDrupalAdmins.sh index 6e8a6cbfdde809ab3215fcd142cdee36fa43062f..689dda3c6ec8e26df4feb8a2a499a03f24ec98ed 100755 --- a/scripts/addGroupToDrupalAdmins.sh +++ b/scripts/addGroupToDrupalAdmins.sh @@ -40,7 +40,7 @@ if [[ $GROUP_EXISTS != "200" ]]; then exit 1 fi -# This CURL will make an API request to bound ${GROUP_NAME} to ${ROLE_ID} in ${APPLICATION_ID}, as per https://authorization-service-api.web.cern.ch/swagger/index.html#operations-Application-post_api_v1_0_Application__id__roles__roleid__groups__groupid_ +# Add group ${GROUP_NAME} to ${ROLE_ID} (administrator) in ${APPLICATION_ID}, as per https://authorization-service-api.web.cern.ch/swagger/index.html#operations-Application-post_api_v1_0_Application__id__roles__roleid__groups__groupid_ SUCCESS=$(curl --silent -X POST "https://authorization-service-api.web.cern.ch/api/v1.0/Application/${APPLICATION_ID}/roles/${ROLE_ID}/groups/${GROUP_NAME}" -H "accept: text/plain" -H "Authorization: Bearer ${BEARER_TOKEN}" -d "" -o /dev/null -w "%{http_code}") if [[ $SUCCESS != "200" ]]; then echo "Error binding group to admin role, error code: ${SUCCESS}" diff --git a/scripts/removeGroupFromDrupalAdmins.sh b/scripts/removeGroupFromDrupalAdmins.sh index ec5c804d88d2b4577956c400f41d649b607cbe01..5d70d49456c4a2de6f8bf1a5681f26f6d330c08c 100755 --- a/scripts/removeGroupFromDrupalAdmins.sh +++ b/scripts/removeGroupFromDrupalAdmins.sh @@ -40,7 +40,7 @@ if [[ $GROUP_EXISTS != "200" ]]; then exit 1 fi -# This CURL will make an API request to remove ${GROUP_NAME} of ${ROLE_ID} from ${APPLICATION_ID}, as per https://authorization-service-api.web.cern.ch/swagger/index.html#operations-Application-delete_api_v1_0_Application__id__roles__roleid__groups__groupid_ +# Remove ${GROUP_NAME} of ${ROLE_ID} (administrator) from ${APPLICATION_ID}, as per https://authorization-service-api.web.cern.ch/swagger/index.html#operations-Application-delete_api_v1_0_Application__id__roles__roleid__groups__groupid_ SUCCESS=$(curl --silent -X DELETE "https://${AUTHZAPI_URL}/${AUTHZAPI_VERSION}/Application/${APPLICATION_ID}/roles/${ROLE_ID}/groups/${GROUP_NAME}" -H "accept: text/plain" -H "Authorization: Bearer ${BEARER_TOKEN}" -d "" -o /dev/null -w "%{http_code}") if [[ $SUCCESS != "200" ]]; then echo "Error binding group to admin role, error code: ${SUCCESS}"