forked from dokku-alt/dokku-alt
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathget-acl
More file actions
executable file
·75 lines (59 loc) · 1.28 KB
/
get-acl
File metadata and controls
executable file
·75 lines (59 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
source "$(dirname $0)/vars"
cat
verify_db_name() {
sanitize_name "$1" "database name"
DB_NAME="$1"
}
case "$1" in
postgresql:create)
verify_db_name "$2"
verify_max_args 2 "$@"
print_acl_access "developer" "$2"
;;
postgresql:list)
verify_app_name "$2"
verify_max_args 2 "$@"
print_acl_access "developer" "$2"
;;
postgresql:info)
verify_app_name "$2"
verify_db_name "$3"
verify_max_args 3 "$@"
if [[ "$2" == "$3" ]]; then
print_acl_access "developer" "$2"
fi
;;
postgresql:link)
verify_app_name "$2"
verify_db_name "$3"
verify_max_args 3 "$@"
if [[ "$2" == "$3" ]]; then
print_acl_access "developer" "$2"
fi
;;
postgresql:unlink)
verify_app_name "$2"
verify_db_name "$3"
verify_max_args 3 "$@"
if [[ "$2" == "$3" ]]; then
print_acl_access "developer" "$2"
fi
;;
postgresql:console)
verify_app_name "$2"
verify_db_name "$3"
verify_max_args 3 "$@"
if [[ "$2" == "$3" ]]; then
print_acl_access "developer" "$2"
fi
;;
postgresql:dump)
verify_app_name "$2"
verify_db_name "$3"
verify_max_args 3 "$@"
if [[ "$2" == "$3" ]]; then
print_acl_access "developer" "$2"
fi
;;
esac