Dede how to prevent user space from displaying an audited article

Source: Internet
Author: User

Requirements: When the user submitted documents for approval status, only the contributors or administrators can view, other users can not view. We can open the/plus/view.php file (Note: This file is a dynamic browsing file for the document) and find the following code:

Check reading permission $needMoney = $arc->fields[' money '];

$needRank = $arc->fields[' Arcrank '];

In the following line, add the following code:

$mid = $arc->fields[' mid '];

if ($cfg _ml->m_rank < 1 | | | $mid <> $cfg _ml->m_id) && $needRank = = 1) {showmsg ("You do not have permission to view",-1);

Exit (); }

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.