fix permisson bug
This commit is contained in:
@@ -135,7 +135,6 @@ class User:
|
||||
for chapter in course.chapters:
|
||||
for lesson in chapter.lessons:
|
||||
self.mongo.db.course_process.update_one({"user_uuid": self.user_uuid, "material_id": course_id}, {"$push": {"lesson_processs": ([], chapter.chapter_name, lesson.lesson_name)}})
|
||||
self.select_course.append(course_id)
|
||||
self.mongo.db.users.update_one({"user_uuid": self.user_uuid}, {"$push": {"select_course": course_id}})
|
||||
except Exception as e:
|
||||
print("=-=-=-=-=-=")
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
<div class="course-info">
|
||||
<h3 class="course-name">{{course.name}}</h3>
|
||||
<p class="course-description">{{course.description}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -120,7 +120,7 @@ def desktop(user_uuid, course_id, chapter_name, lesson_name):
|
||||
)
|
||||
# 确保文件的所有权归 user_id
|
||||
subprocess.run(
|
||||
["sudo", "chown", f"{user_id}:shared_group_{user_id}", config_path],
|
||||
["sudo", "chown","-R", f"flask:shared_group_{user_id}", config_path],
|
||||
check=True
|
||||
)
|
||||
subprocess.run(
|
||||
|
||||
1
Html/db/data/user/test0929.json
Normal file
1
Html/db/data/user/test0929.json
Normal file
@@ -0,0 +1 @@
|
||||
{"username": "test0929"}
|
||||
1
Html/db/data/user/yara.json
Normal file
1
Html/db/data/user/yara.json
Normal file
@@ -0,0 +1 @@
|
||||
{"username": "yara"}
|
||||
1
Html/db/data/user/yarat.json
Normal file
1
Html/db/data/user/yarat.json
Normal file
@@ -0,0 +1 @@
|
||||
{"username": "yarat"}
|
||||
1
Html/db/data/user/yizhiqinge.json
Normal file
1
Html/db/data/user/yizhiqinge.json
Normal file
@@ -0,0 +1 @@
|
||||
{"username": "yizhiqinge"}
|
||||
Reference in New Issue
Block a user