تمكين الإعداد للسماح للمسؤولين بحذف البيانات بشكل دائم

:bookmark: This is a guide on how to enable the setting for administrators to permanently delete data on a Discourse instance.

:person_raising_hand: Required user level: System Admin

:wrench: Console access required

As of 2.8.0.beta7: Security Release, Fast Edits, Topic Bookmarks, and more there is a hidden site setting to allow admins to permanently delete data.

Enabling permanent deletion via the Rails console

To enable the setting using the Rails console, execute the following commands:

  1. Access your Discourse application directory:
cd /var/discourse
  1. Enter the app container:
./launcher enter app
  1. Access the Rails console:
rails c
  1. Set the site setting can_permanently_delete to true:
SiteSetting.can_permanently_delete = true
  1. Exit the Rails console:
exit
  1. Exit the app container:
exit

This change takes effect immediately, and no further action is required.

Enabling permanent deletion via app.yml

Another way to enable permanent deletion is through the app.yml configuration file. Follow these steps:

  1. Open the app.yml file located in your Discourse application directory.

  2. Locate the env: section. You can find this under DISCOURSE_HOSTNAME.

  3. Add the following line to enable permanent deletion:

    DISCOURSE_CAN_PERMANENTLY_DELETE: true
    
  4. Save the changes and execute the following command to rebuild your app:

    ./launcher rebuild app
    

Your changes will take effect once the rebuild process is complete.

Last edited by @SaraDev 2024-09-17T23:55:45Z

Check documentPerform check on document:
20 إعجابًا

"حذف البيانات" يعني أنه سيتم حذف جميع المواضيع والمنشورات والمرفوعات وما إلى ذلك، كل شيء من موقعنا وسيصبح مجرد موقع جديد فارغ؟


أم أنه سيتم حذف حاوية "البيانات" أو شيء من هذا القبيل؟

يشير إلى هذه الميزة - Introducing permanently delete post functionality

إنها تسمح للمسؤولين بحذف المشاركات/المواضيع بشكل دائم عند تمكينها، بدلاً من الحذف الناعم العادي بدونها.

4 إعجابات