Skip to content

Commit 472b606

Browse files
committed
Lock down hestia in demo mode.
1 parent d3c67ca commit 472b606

File tree

113 files changed

+330
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+330
-2
lines changed

bin/v-acknowledge-user-notification

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ check_args '2' "$#" 'USER NOTIFICATION'
2626
is_format_valid 'user' 'nid'
2727
is_object_valid 'user' 'USER' "$user"
2828

29+
# Perform verification if read-only mode is enabled
30+
check_hestia_demo_mode
31+
2932

3033
#----------------------------------------------------------#
3134
# Action #

bin/v-add-cron-hestia-autoupdate

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if [ ! -z "$check_cron" ]; then
2929
exit
3030
fi
3131

32+
# Perform verification if read-only mode is enabled
33+
check_hestia_demo_mode
34+
3235

3336
#----------------------------------------------------------#
3437
# Action #

bin/v-add-cron-job

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ is_object_new 'cron' 'JOB' "$job"
4444
# Perform verification if read-only mode is enabled
4545
check_hestia_demo_mode
4646

47+
4748
#----------------------------------------------------------#
4849
# Action #
4950
#----------------------------------------------------------#

bin/v-add-database

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ is_package_full 'DATABASES'
4949
is_password_valid
5050
dbpass="$password"
5151

52+
# Perform verification if read-only mode is enabled
53+
check_hestia_demo_mode
54+
55+
5256
#----------------------------------------------------------#
5357
# Action #
5458
#----------------------------------------------------------#

bin/v-add-dns-domain

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ if [ ! -z "$ns8" ]; then
8383
is_format_valid 'ns8'
8484
fi
8585

86+
# Perform verification if read-only mode is enabled
87+
check_hestia_demo_mode
88+
8689

8790
#----------------------------------------------------------#
8891
# Action #

bin/v-add-dns-record

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ is_object_new "dns/$domain" 'ID' "$id"
8383
is_dns_fqnd "$rtype" "$dvalue"
8484
is_dns_nameserver_valid "$domain" "$rtype" "$dvalue"
8585

86+
# Perform verification if read-only mode is enabled
87+
check_hestia_demo_mode
88+
8689

8790
#----------------------------------------------------------#
8891
# Action #

bin/v-add-domain

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ fi
3232
is_object_valid 'user' 'USER' "$user"
3333
is_object_unsuspended 'user' 'USER' "$user"
3434

35+
# Perform verification if read-only mode is enabled
36+
check_hestia_demo_mode
37+
3538

3639
#----------------------------------------------------------#
3740
# Action #

bin/v-add-mail-account

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if [[ "$account" =~ [[:upper:]] ]]; then
2626
account=$(echo "$account" |tr '[:upper:]' '[:lower:]')
2727
fi
2828

29+
2930
#----------------------------------------------------------#
3031
# Verifications #
3132
#----------------------------------------------------------#
@@ -44,6 +45,10 @@ is_package_full 'MAIL_ACCOUNTS'
4445
is_mail_new "$account"
4546
is_password_valid
4647

48+
# Perform verification if read-only mode is enabled
49+
check_hestia_demo_mode
50+
51+
4752
#----------------------------------------------------------#
4853
# Action #
4954
#----------------------------------------------------------#

bin/v-add-mail-account-alias

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ is_object_valid "mail/$domain" 'ACCOUNT' "$account"
4242
is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account"
4343
is_mail_new "$malias"
4444

45+
# Perform verification if read-only mode is enabled
46+
check_hestia_demo_mode
47+
4548

4649
#----------------------------------------------------------#
4750
# Action #

bin/v-add-mail-account-autoreply

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ is_object_valid "mail/$domain" 'ACCOUNT' "$account"
4949
is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account"
5050
# is_object_value_empty "mail/$domain" 'ACCOUNT' "$account" '$AUTOREPLY'
5151

52+
# Perform verification if read-only mode is enabled
53+
check_hestia_demo_mode
54+
5255

5356
#----------------------------------------------------------#
5457
# Action #

0 commit comments

Comments
 (0)