• Hi There,

    Is there a way without hacking the core to only allow user to edit/view and create their own page in the Dashboard, so they are not able to view other pages that is not created by them?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Almost certainly, although I haven’t done exactly that myself. A site where users cannot even see the home page would be unusual, so I assume you will also want certain pages to be public.

    Thread Starter queenielow

    (@queenielow)

    Hi Rob,

    Yes only certain page/post type that need to apply this rule. Do u have any idea how to do it?

    Moderator bcworkz

    (@bcworkz)

    When one publishes a post, it can be set to Private. If this must be mandatory for certain users, hook the ‘save_post’ action and if the user has (or lacks) a certain capability, change the post_status to private.

    In general there are three steps for this kind of task.

    1. Assign capabilities to allow users to do whatever you need them to be able to do. In your case you could use the existing Author role or add a new role for these users. They will need to be able to create and publish pages.

    2. Restrict the admin interface so that users cannot do everything their capabilities allow. In your case you would restrict these users to creating and publishing just one page. You can do this by injecting CSS and JavaScript into the admin screens to modify them.

    3. Restrict the back end, so that users cannot hack their way around the restrictions at step 2. For example, in your case you would prevent any user from going to any specially constructed URL that would let them edit someone else’s page.

    It is not a simple matter to code all this!

    Thread Starter queenielow

    (@queenielow)

    Thanks guys.
    I have tried using your methods and it work.

    Cheers

    Is there a plugin that would do this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Allow user to edit/view/create their own page only’ is closed to new replies.