How to remove all restrictions from a specific page via the database

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


目的

If you'd like to remove page level permissions for a specific page via the database

ソリューション

  1. Confluence をシャットダウンします。
  2. データベースのバックアップを取得します。
  3. Run below queries to replacing  page title and the spaceid   you'd like to have the permissions removed from:

    データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。


    DELETE from CONTENT_PERM WHERE CPS_ID IN (select ID from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT where title='page title' and spaceid = 'spaceid where the page is housed'));
    DELETE from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT WHERE title='page title' and spaceid = 'spaceid where the page is housed');
  4. Confluence を起動します。


注意

Removing single user from the Page Restrictions

Sometimes, we may need to remove single users from the page restrictions via database using the page title and the username which needs to be removed using below query.

DELETE from CONTENT_PERM WHERE CPS_ID IN (select ID from CONTENT_PERM_SET WHERE CONTENT_ID IN (select CONTENTID from CONTENT where title='Restrict' and spaceid = 'spaceid where the page is housed')) AND username = (select user_key from user_mapping where lower_username='test');



Last modified on Mar 21, 2024

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.