Skip to content

Commit b67b96a

Browse files
committed
chore(common): represent more org structure
1 parent 196c74e commit b67b96a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

bin/common.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ set -eu
55
DOMAIN="compiler.la"
66
# Compiler's archive account
77
ARCHIVE="archive@$DOMAIN"
8-
# Compiler groups
9-
PARTNERS="partners@$DOMAIN"
10-
STAFF="staff@$DOMAIN"
11-
TEAM="team@$DOMAIN"
8+
# Compiler org structure
9+
OU_CONTRACTORS="contractors"
10+
OU_STAFF="staff"
11+
OU_PARTNERS="$OU_STAFF/partners"
12+
GROUP_PARTNERS="$OU_PARTNERS@$DOMAIN"
13+
GROUP_STAFF="$OU_STAFF@$DOMAIN"
14+
GROUP_TEAM="team@$DOMAIN"
1215

1316
# prints a simple timestamp HH:mm:ss
1417
ts () {
@@ -42,9 +45,9 @@ user_in_group() {
4245
}
4346

4447
user_is_partner() {
45-
user_in_group "$1" "$PARTNERS"
48+
user_in_group "$1" "$GROUP_PARTNERS"
4649
}
4750

4851
user_is_staff() {
49-
user_in_group "$1" "$STAFF"
52+
user_in_group "$1" "$GROUP_STAFF"
5053
}

bin/create.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ echo_ts "Creating account..."
4646

4747
gam create user $ACCOUNT password random changepassword "$@"
4848

49-
echo_ts "Adding to $TEAM group..."
49+
echo_ts "Adding to $GROUP_TEAM group..."
5050

51-
gam user $ACCOUNT add groups member $TEAM
51+
gam user $ACCOUNT add groups member $GROUP_TEAM
5252

5353
echo_ts "$ACCOUNT has been created"

0 commit comments

Comments
 (0)