mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 10:34:17 +00:00
39edd60fd6
* added test and some additional support for deny permissions w/ burnettk * added support for deny through permissions-check api w/ burnettk * support DENY at the beginning of a permission target marcro * do not look up permissions using grant type, only use the uniqueness key * added support in frontend to display a nice error if user does not have access to a data object value w/ burnettk --------- Co-authored-by: jasquat <jasquat@users.noreply.github.com>
27 lines
876 B
Bash
Executable File
27 lines
876 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
function error_handler() {
|
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
|
exit "$2"
|
|
}
|
|
trap 'error_handler ${LINENO} $?' ERR
|
|
set -o errtrace -o errexit -o nounset -o pipefail
|
|
|
|
database=spiffworkflow_backend_local_development
|
|
if [[ "${1:-}" == "test" ]]; then
|
|
database=spiffworkflow_backend_unit_testing
|
|
fi
|
|
|
|
# shellcheck disable=2016
|
|
mysql -uroot "$database" -e '
|
|
select u.username username, g.identifier group_name
|
|
FROM `user` u
|
|
JOIN `user_group_assignment` uga ON uga.user_id = u.id
|
|
JOIN `group` g ON g.id = uga.group_id;
|
|
|
|
select pa.id pa_id, g.identifier group_identifier, pt.uri, pa.grant_type, permission, p.id principal_id from permission_assignment pa
|
|
JOIN principal p ON p.id = pa.principal_id
|
|
JOIN `group` g ON g.id = p.group_id
|
|
JOIN permission_target pt ON pt.id = pa.permission_target_id;
|
|
'
|