flow avec l'user uuid pas le role uuid
This commit is contained in:
parent
8e1162de67
commit
ae86c1e824
|
|
@ -52,6 +52,9 @@ FLOW_EXISTS=$(echo $(mariadb -u directus -p${DB_DIRECTUS_PASSWORD} directus -e "
|
|||
website_role_uuid=$(echo $(mariadb -u directus -p${DB_DIRECTUS_PASSWORD} \
|
||||
-e "SELECT id FROM directus.directus_roles WHERE name='Website'") | awk '{print $2}')
|
||||
|
||||
website_user_uuid=$(echo $(mariadb -u directus -p${DB_DIRECTUS_PASSWORD} \
|
||||
-e "SELECT id FROM directus.directus_users WHERE role='${website_role_uuid}'") | awk '{print $2}')
|
||||
|
||||
if [ $FLOW_EXISTS -eq 0 ]; then
|
||||
flow_id="fdd75914-80dd-44ac-9d62-c7a08bc9cae6"
|
||||
operation_id="371b1b41-312d-4df6-ab68-336b416e1f16"
|
||||
|
|
@ -60,11 +63,11 @@ if [ $FLOW_EXISTS -eq 0 ]; then
|
|||
"INSERT INTO directus_flows (id, name, icon, color, description, status, \`trigger\`, accountability, options, operation, user_created) \
|
||||
VALUES (\"${flow_id}\", 'Build', 'bolt', '#FFA439', 'Trigger static site build on content modification', 'active', 'event', 'all', \
|
||||
'{\"type\":\"action\",\"scope\":[\"items.create\",\"items.update\",\"items.sort\",\"items.delete\",\"items.promote\"],\"collections\":[\"directus_files\"]}', \
|
||||
\"${operation_id}\", \"${website_role_uuid}\")"
|
||||
\"${operation_id}\", \"${website_user_uuid}\")"
|
||||
|
||||
mariadb -u directus -p${DB_DIRECTUS_PASSWORD} directus -e \
|
||||
"INSERT INTO directus_operations (id, name, \`key\`, type, position_x, position_y, options, flow, user_created) \
|
||||
VALUES (\"${operation_id}\", 'Webhook / Request URL', 'request_56aby', 'request', 23, 2, \
|
||||
'{\"headers\":[{\"header\":\"Authorization\",\"value\":\"${auth_header}\"},{\"header\":\"Content-Type\",\"value\":\"application/json\"}],\"method\":\"POST\",\"url\":\"https://${DOMAIN_NAME}/webhook.php\",\"body\":null}', \
|
||||
\"${flow_id}\", \"${website_role_uuid}\")"
|
||||
\"${flow_id}\", \"${website_user_uuid}\")"
|
||||
fi
|
||||
Loading…
Reference in New Issue