Skip to content

Commit 86879e0

Browse files
committed
Remove permission check to allow restore under different username.
1 parent f5bb4dd commit 86879e0

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

bin/v-restore-user

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ source $HESTIA/func/db.sh
3636
source $HESTIA/func/rebuild.sh
3737
source $HESTIA/conf/hestia.conf
3838

39-
# Check backup ownership function
40-
is_backup_available() {
41-
passed=false
42-
if [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_[0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
43-
passed=true
44-
elif [[ $2 =~ ^$1.[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tar$ ]]; then
45-
passed=true
46-
fi
47-
48-
if [ $passed = false ]; then
49-
check_result $E_FORBIDEN "permission denied"
50-
fi
51-
}
52-
5339
# Defining FTP command function
5440
ftpc() {
5541
/usr/bin/ftp -n $HOST $PORT <<EOF
@@ -167,7 +153,6 @@ google_download() {
167153
args_usage='USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]'
168154
check_args '2' "$#" "$args_usage"
169155
is_format_valid 'user' 'backup'
170-
is_backup_available "$user" "$backup"
171156

172157

173158
#----------------------------------------------------------#

0 commit comments

Comments
 (0)