Changed the rule for backup delete permission
diff --git a/requirements.txt b/requirements.txt
index 9c3aad4..1b57644 100755
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,6 +13,6 @@
oslo_versionedobjects
openstacksdk>0.28.0
pymysql
-
+parse
# email
# smtplib
\ No newline at end of file
diff --git a/staffeln/api/app.py b/staffeln/api/app.py
index de5875e..d59902b 100755
--- a/staffeln/api/app.py
+++ b/staffeln/api/app.py
@@ -24,8 +24,8 @@
"Error: backup_id or user_id is missing.", status=403, mimetype="text/plain"
)
- if current_user_id != request.args["user_id"]:
- return Response("False", status=401, mimetype="text/plain")
+ if current_user_id == request.args["user_id"]:
+ return Response("True", status=200, mimetype="text/plain")
# Retrive the backup object from backup_data table with matching backup_id.
backup = objects.Volume.get_backup_by_backup_id(ctx, request.args["backup_id"])